pgsql: Make crash recovery ignore restore_command and recovery_end_comm

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Make crash recovery ignore restore_command and recovery_end_comm
Date: 2019-10-11 06:49:48
Message-ID: E1iIokG-0008Po-SF@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Make crash recovery ignore restore_command and recovery_end_command settings.

In v11 or before, those settings could not take effect in crash recovery
because they are specified in recovery.conf and crash recovery always
starts without recovery.conf. But commit 2dedf4d9a8 integrated
recovery.conf into postgresql.conf and which unexpectedly allowed
those settings to take effect even in crash recovery. This is definitely
not good behavior.

To fix the issue, this commit makes crash recovery always ignore
restore_command and recovery_end_command settings.

Back-patch to v12 where the issue was added.

Author: Fujii Masao
Reviewed-by: Peter Eisentraut
Discussion: https://postgr.es/m/e445616d-023e-a268-8aa1-67b8b335340c@pgmasters.net

Branch
------
REL_12_STABLE

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

Modified Files
--------------
src/backend/access/transam/xlog.c | 6 +++---
src/backend/access/transam/xlogarchive.c | 7 +++++++
2 files changed, 10 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2019-10-11 06:49:59 pgsql: Make crash recovery ignore restore_command and recovery_end_comm
Previous Message Tom Lane 2019-10-10 21:16:08 Re: pgsql: Fix table rewrites that include a column without a default.