Thread: pgsql: Add additional checks while creating the initial decoding snapsh

pgsql: Add additional checks while creating the initial decoding snapsh

From
Amit Kapila
Date:
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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/240e0dbacd390a8465552e27c5af11f67d747adb

Modified Files
--------------
src/backend/replication/logical/snapbuild.c | 29 ++++++++++++++++++-----------
src/backend/replication/walsender.c         |  5 +++++
2 files changed, 23 insertions(+), 11 deletions(-)