pgsql: Avoid uselessly looking up old LOCK_ONLY multixacts - Mailing list pgsql-committers

From Alvaro Herrera
Subject pgsql: Avoid uselessly looking up old LOCK_ONLY multixacts
Date
Msg-id E1XCDKE-0003Ll-EM@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Avoid uselessly looking up old LOCK_ONLY multixacts

Commit 0ac5ad5134f2 removed an optimization in multixact.c that skipped
fetching members of MultiXactId that were older than our
OldestVisibleMXactId value.  The reason this was removed is that it is
possible for multixacts that contain updates to be older than that
value.  However, if the caller is certain that the multi does not
contain an update (because the infomask bits say so), it can pass this
info down to GetMultiXactIdMembers, enabling it to use the old
optimization.

Pointed out by Andres Freund in 20131121200517.GM7240@alap2.anarazel.de

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/05315498012530d44cd89a209242a243374e274d

Modified Files
--------------
contrib/pgrowlocks/pgrowlocks.c        |    3 ++-
src/backend/access/heap/heapam.c       |   33 +++++++++++++++++++++-----------
src/backend/access/transam/multixact.c |   31 ++++++++++++++++++++++++------
src/backend/utils/time/tqual.c         |   16 +++++++++++-----
src/include/access/multixact.h         |    4 ++--
5 files changed, 62 insertions(+), 25 deletions(-)


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Simplify multixact freezing a bit
Next
From: Bruce Momjian
Date:
Subject: pgsql: pg_upgrade: improve C comment wording