Track replication origin progress for rollbacks.
authorAmit Kapila <akapila@postgresql.org>
Mon, 8 Mar 2021 02:24:03 +0000 (07:54 +0530)
committerAmit Kapila <akapila@postgresql.org>
Mon, 8 Mar 2021 02:24:03 +0000 (07:54 +0530)
commit8a812e5106c5db50039336288d376a188844e2cc
treec4a2dcdde600f9139be1188bfbeb9f7f696fc1e4
parentf9a0392e1cf36179c984f655a6589734b8dd7468
Track replication origin progress for rollbacks.

Commit 1eb6d6527a allowed to track replica origin replay progress for 2PC
but it was not complete. It misses to properly track the progress for
rollback prepared especially it missed updating the code for recovery.
Additionally, we need to allow tracking it on subscriber nodes where
wal_level might not be logical.

It is required to track decoding of 2PC which is committed in PG14
(a271a1b50e) and also nobody complained about this till now so not
backpatching it.

Author: Amit Kapila
Reviewed-by: Michael Paquier and Ajin Cherian
Discussion: https://postgr.es/m/CAA4eK1L-kHmMnSdrRW6UhRbCjR7cgh04c+6psY15qzT6ktcd+g@mail.gmail.com
src/backend/access/transam/twophase.c
src/backend/access/transam/xact.c