pgsql: Revert "Get rid of the dedicated latch for signaling the startup

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Revert "Get rid of the dedicated latch for signaling the startup
Date: 2020-12-17 09:09:39
Message-ID: E1kppI3-0003us-AI@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Revert "Get rid of the dedicated latch for signaling the startup process".

Revert ac22929a26, as well as the followup fix 113d3591b8. Because it broke
the assumption that the startup process waiting for the recovery conflict
on buffer pin should be waken up only by buffer unpin or the timeout enabled
in ResolveRecoveryConflictWithBufferPin(). It caused, for example,
SIGHUP signal handler or walreceiver process to wake that startup process
up unnecessarily frequently.

Additionally, add the comments about why that dedicated latch that
the reverted patch tried to get rid of should not be removed.

Thanks to Kyotaro Horiguchi for the discussion.

Author: Fujii Masao
Discussion: https://postgr.es/m/d8c0c608-021b-3c73-fffd-3240829ee986@oss.nttdata.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/00f690a239932e477f25120d19b08aacdc30deb7

Modified Files
--------------
src/backend/access/transam/xlog.c | 40 ++++++++++++++++++++++++---------------
src/backend/postmaster/startup.c | 24 ++++++++++++++++++-----
src/backend/storage/ipc/standby.c | 9 ++++++++-
3 files changed, 52 insertions(+), 21 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2020-12-17 09:17:54 Re: pgsql: Get rid of the dedicated latch for signaling the startup process
Previous Message Tom Lane 2020-12-16 02:42:24 pgsql: Fix varchar_2.out to match reality in cs_CZ locale.