pgsql: Update minimum recovery point on truncation during WAL replay of

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Update minimum recovery point on truncation during WAL replay of
Date: 2021-07-28 16:38:31
Message-ID: E1m8mZj-0005sI-0I@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Update minimum recovery point on truncation during WAL replay of abort record.

If a file is truncated, we must update minRecoveryPoint. Once a file is
truncated, there's no going back; it would not be safe to stop recovery
at a point earlier than that anymore.

Commit 7bffc9b7bf changed xact_redo_commit() so that it updates
minRecoveryPoint on truncation, but forgot to change xact_redo_abort().

Back-patch to all supported versions.

Reported-by: mengjuan(dot)cmj(at)alibaba-inc(dot)com
Author: Fujii Masao
Reviewed-by: Heikki Linnakangas
Discussion: https://postgr.es/m/b029fce3-4fac-4265-968e-16f36ff4d075.mengjuan.cmj@alibaba-inc.com

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/32d182dd0da9628a4bc1515b69694d6e361a8de4

Modified Files
--------------
src/backend/access/transam/xact.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message David Rowley 2021-07-28 22:14:59 pgsql: Make the includes field an array in MSVC build scripts
Previous Message Fujii Masao 2021-07-28 16:38:16 pgsql: Update minimum recovery point on truncation during WAL replay of