mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
Avoid uselessly looking up old LOCK_ONLY multixacts
Commit 0ac5ad5134 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
This commit is contained in:
@@ -91,10 +91,10 @@ extern MultiXactId MultiXactIdCreateFromMembers(int nmembers,
|
||||
MultiXactMember *members);
|
||||
|
||||
extern MultiXactId ReadNextMultiXactId(void);
|
||||
extern bool MultiXactIdIsRunning(MultiXactId multi);
|
||||
extern bool MultiXactIdIsRunning(MultiXactId multi, bool isLockOnly);
|
||||
extern void MultiXactIdSetOldestMember(void);
|
||||
extern int GetMultiXactIdMembers(MultiXactId multi, MultiXactMember **xids,
|
||||
bool allow_old);
|
||||
bool allow_old, bool isLockOnly);
|
||||
extern bool MultiXactHasRunningRemoteMembers(MultiXactId multi);
|
||||
extern bool MultiXactIdPrecedes(MultiXactId multi1, MultiXactId multi2);
|
||||
extern bool MultiXactIdPrecedesOrEquals(MultiXactId multi1,
|
||||
|
||||
Reference in New Issue
Block a user