Split PGPROC 'links' field into two, for clarity
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Author:
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2026-02-20T20:34:42Z
Releases:
19 (unreleased)
Split PGPROC 'links' field into two, for clarity The field was mainly used for the position in a LOCK's wait queue, but also as the position in a the freelist when the PGPROC entry was not in use. The reuse saves some memory at the expense of readability, which seems like a bad tradeoff. If we wanted to make the struct smaller there's other things we could do, but we're actually just discussing adding padding to the struct for performance reasons. Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Discussion: https://www.postgresql.org/message-id/3dd6f70c-b94d-4428-8e75-74a7136396be@iki.fi
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/twophase.c | modified | +1 −1 |
| src/backend/storage/lmgr/deadlock.c | modified | +7 −7 |
| src/backend/storage/lmgr/lock.c | modified | +3 −3 |
| src/backend/storage/lmgr/proc.c | modified | +20 −19 |
| src/include/storage/proc.h | modified | +3 −5 |
Discussion
- pgsql: Separate RecoveryConflictReasons from procsignals 22 messages · 2026-02-10 → 2026-03-16