public inbox for [email protected]  
help / color / mirror / Atom feed
From: Heikki Linnakangas <[email protected]>
To: [email protected]
Subject: pgsql: Split PGPROC 'links' field into two, for clarity
Date: Fri, 20 Feb 2026 21:01:18 +0000
Message-ID: <[email protected]> (raw)

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 <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/36bbcd5be3ffee1aa03f69228022decef6ebd37a

Modified Files
--------------
src/backend/access/transam/twophase.c |  2 +-
src/backend/storage/lmgr/deadlock.c   | 14 ++++++-------
src/backend/storage/lmgr/lock.c       |  6 +++---
src/backend/storage/lmgr/proc.c       | 39 ++++++++++++++++++-----------------
src/include/storage/proc.h            |  8 +++----
5 files changed, 34 insertions(+), 35 deletions(-)



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: Split PGPROC 'links' field into two, for clarity
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox