When a standby is promoted to primary during checksum enabling when the state is inprogress-on, the standby shall revert the state to off since checksums weren't fully enabled at the time of the crash. Consider the following scenario: 1) primary/standby cluster has checksums off 2) primary starts enabling checksums 3) primary moves to inprogress-on 4) standby receives that and moves to inprogress-on too 5) primary crashes 6) standby gets promoted, and does the StartupXLOG thing 7) standby moves from inprogress-on back to off Any processes in the standby need to be informed at step 6 to change state with a procsignalbarrier, else they will stay in inprogress-on while new backends will see the state as off. StartupXLOG failed to emit a procsignalbarrier which caused inconsistent state in the node promoted to primary. Fixed by emitting a procsignalbarrier during promotion, and adding a new test for this scenario. Author: Daniel Gustafsson <daniel@yesql.se> Reported-by: Tomas Vondra <tomas@vondra.me> Discussion: https://postgr.es/m/f1281cf3-89a3-4936-9bc5-2a5a6291229f@vondra.me
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/.