]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Add assertions checking for the startup process in WAL replay routines
authorMichael Paquier <michael@paquier.xyz>
Wed, 5 Nov 2025 01:41:50 +0000 (10:41 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 5 Nov 2025 01:41:50 +0000 (10:41 +0900)
commit2fc31079624e16d6b1a8508958dbf81e8edce057
tree2763780df01d064b83f0ad1dc355ad60f6f9780e
parentdae00f333bdd98d094275080dba248cc80d4ca04
Add assertions checking for the startup process in WAL replay routines

These assertions may prove to become useful to make sure that no process
other than the startup process calls the routines where these checks are
added, as we expect that these do not interfere with a WAL receiver
switched to a "stopping" state by a startup process.

The assumption that only the startup process can use this code has
existed for many years, without a check enforcing it.

Reviewed-by: Xuneng Zhou <xunengzhou@gmail.com>
Discussion: https://postgr.es/m/aQmGeVLYl51y1m_0@paquier.xyz
src/backend/access/transam/xlog.c
src/backend/access/transam/xlogrecovery.c