diff options
author | Peter Geoghegan | 2023-01-02 18:16:51 +0000 |
---|---|---|
committer | Peter Geoghegan | 2023-01-02 18:16:51 +0000 |
commit | 6daeeb1f9196e5d59aa7d5c9ef7ed67b3f3ac4b5 (patch) | |
tree | 43a3c49c362942b80b4e68f664b452514fe87a5f /src/backend/storage/ipc | |
parent | 1fd3dd2048991a164c287dc29fdb78b1f7e6e14e (diff) |
Avoid special XID snapshotConflictHorizon values.
Don't allow VACUUM to WAL-log the value FrozenTransactionId as the
snapshotConflictHorizon of freezing or visibility map related WAL
records.
The only special XID value that's an allowable snapshotConflictHorizon
is InvalidTransactionId, which is interpreted as "record definitely
doesn't require a recovery conflict".
Author: Peter Geoghegan <[email protected]>
Discussion: https://postgr.es/m/CAH2-WznuNGSzF8v6OsgjaC5aYsb3cZ6HW6MLm30X0d65cmSH6A@mail.gmail.com
Diffstat (limited to 'src/backend/storage/ipc')
-rw-r--r-- | src/backend/storage/ipc/standby.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c index f43229dfda6..ede00fee935 100644 --- a/src/backend/storage/ipc/standby.c +++ b/src/backend/storage/ipc/standby.c @@ -493,6 +493,7 @@ ResolveRecoveryConflictWithSnapshot(TransactionId snapshotConflictHorizon, if (!TransactionIdIsValid(snapshotConflictHorizon)) return; + Assert(TransactionIdIsNormal(snapshotConflictHorizon)); backends = GetConflictingVirtualXIDs(snapshotConflictHorizon, locator.dbOid); ResolveRecoveryConflictWithVirtualXIDs(backends, |