Re: Remove non-fast promotion Re: Should we remove a fallbackpromotion? take 2 - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Remove non-fast promotion Re: Should we remove a fallbackpromotion? take 2
Date
Msg-id 20200421215726.GA26662@alvherre.pgsql
Whole thread Raw
In response to Remove non-fast promotion Re: Should we remove a fallback promotion?take 2  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Responses Re: Remove non-fast promotion Re: Should we remove a fallbackpromotion? take 2  (Fujii Masao <masao.fujii@oss.nttdata.com>)
List pgsql-hackers
On 2020-Apr-20, Fujii Masao wrote:

> +    /*
> +     * In 9.1 and 9.2 the postmaster unlinked the promote file inside the
> +     * signal handler. It now leaves the file in place and lets the
> +     * Startup process do the unlink.
> +     */
> +    if (IsPromoteSignaled() && stat(PROMOTE_SIGNAL_FILE, &stat_buf) == 0)
>      {
> -        /*
> -         * In 9.1 and 9.2 the postmaster unlinked the promote file inside the
> -         * signal handler. It now leaves the file in place and lets the
> -         * Startup process do the unlink. This allows Startup to know whether
> -         * it should create a full checkpoint before starting up (fallback
> -         * mode). Fast promotion takes precedence.
> -         */

It seems pointless to leave a very old comment that documents what the
code no longer does.  I thikn it would be better to reword it indicating
what the code does do, ie. something like "Leave the signal file in
place; it will be removed by the startup process when ..."

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Remove non-fast promotion Re: Should we remove a fallbackpromotion? take 2
Next
From: Bruce Momjian
Date:
Subject: Re: Do we need to handle orphaned prepared transactions in theserver?