mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Add additional checks while creating the initial decoding snapshot.
As per one of the CI reports, there is an assertion failure which indicates that we were trying to use an unenforced xmin horizon for decoding snapshots. Though, we couldn't figure out the reason for assertion failure these checks would help us in finding the reason if the problem happens again in the future. Author: Amit Kapila based on suggestions by Andres Freund Reviewd by: Andres Freund Discussion: https://postgr.es/m/CAA4eK1L8wYcyTPxNzPGkhuO52WBGoOZbT0A73Le=ZUWYAYmdfw@mail.gmail.com
This commit is contained in:
@ -1099,6 +1099,11 @@ CreateReplicationSlot(CreateReplicationSlotCmd *cmd)
|
||||
/*- translator: %s is a CREATE_REPLICATION_SLOT statement */
|
||||
(errmsg("%s must be called in REPEATABLE READ isolation mode transaction",
|
||||
"CREATE_REPLICATION_SLOT ... (SNAPSHOT 'use')")));
|
||||
if (!XactReadOnly)
|
||||
ereport(ERROR,
|
||||
/*- translator: %s is a CREATE_REPLICATION_SLOT statement */
|
||||
(errmsg("%s must be called in a read only transaction",
|
||||
"CREATE_REPLICATION_SLOT ... (SNAPSHOT 'use')")));
|
||||
|
||||
if (FirstSnapshotSet)
|
||||
ereport(ERROR,
|
||||
|
Reference in New Issue
Block a user