Recovery: ensure CLOG updates wait for minRecoveryPoint.

The hot_standby=on case already used TransactionIdAsyncCommitTree();
use that for hot_standby=off, too.

Before this commit, it was possible that the CLOG status could reach
disk without advancing minRecoveryPoint. Recovering with PITR prior to
the transaction's commit record could incorrectly see the transaction
as committed.

Reviewed-by: Ayush Tiwari <[email protected]>
Discussion: 
https://postgr.es/m/[email protected]
Backpatch-through: 15

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f8bd8d39783136d849eef57bf227d600f8b3442a

Modified Files
--------------
src/backend/access/transam/clog.c |  5 -----
src/backend/access/transam/xact.c | 17 ++++++++---------
2 files changed, 8 insertions(+), 14 deletions(-)

Reply via email to