When both standby.signal and recovery.signal are present, standby.signal takes precedence and the server runs in standby mode. Previously, in this case, recovery.signal was not removed at the end of standby mode (i.e., on promotion) or at the end of archive recovery, while standby.signal was removed. As a result, a leftover recovery.signal could cause a subsequent restart to enter archive recovery unexpectedly, potentially preventing the server from starting. This behavior was surprising and confusing to users. This commit fixes the issue by updating the recovery code to remove recovery.signal alongside standby.signal when both files are present and recovery completes. Because this code path is particularly sensitive and changes in recovery behavior can be risky for stable branches, this change is applied only to the master branch. Reported-by: Nikolay Samokhvalov <nik@postgres.ai> Author: Fujii Masao <masao.fujii@gmail.com> Reviewed-by: Michael Paquier <michael@paquier.xyz> Reviewed-by: David Steele <david@pgbackrest.org> Discussion: https://postgr.es/m/CAM527d8PVAQFLt_ndTXE19F-XpDZui861882L0rLY3YihQB8qA@mail.gmail.com
PostgreSQL Database Management System
This directory contains the source code distribution of the PostgreSQL database management system.
PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings.
Copyright and license information can be found in the file COPYRIGHT.
General documentation about this version of PostgreSQL can be found at https://www.postgresql.org/docs/devel/. In particular, information about building PostgreSQL from the source code can be found at https://www.postgresql.org/docs/devel/installation.html.
The latest version of this software, and related software, may be obtained at https://www.postgresql.org/download/. For more information look at our web site located at https://www.postgresql.org/.