diff options
| author | Alvaro Herrera | 2014-07-29 19:41:06 +0000 |
|---|---|---|
| committer | Alvaro Herrera | 2014-07-29 19:41:06 +0000 |
| commit | 05315498012530d44cd89a209242a243374e274d (patch) | |
| tree | 0891fa0bfed656819ba4bf1383a7e670656f1c79 /src/include/access | |
| parent | c2581794f37e76c910eb91f1bf1f1e581123abd6 (diff) | |
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
Diffstat (limited to 'src/include/access')
| -rw-r--r-- | src/include/access/multixact.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/access/multixact.h b/src/include/access/multixact.h index f6d2e0418b1..8db773b1b58 100644 --- a/src/include/access/multixact.h +++ b/src/include/access/multixact.h @@ -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, |
