]> granicus.if.org Git - postgresql/commit
Fix assertion failure when updating full_page_writes for checkpointer.
authorAmit Kapila <akapila@postgresql.org>
Fri, 28 Sep 2018 06:20:17 +0000 (11:50 +0530)
committerAmit Kapila <akapila@postgresql.org>
Fri, 28 Sep 2018 11:10:04 +0000 (16:40 +0530)
commita86bf6057edf7bc344f1ab6ba7824b561ed9068a
treef0c7582c6bf7cdcf95b330b7936a764424f0525d
parent92a0342a90b38b0b007f079d33286f9aefabfe40
Fix assertion failure when updating full_page_writes for checkpointer.

When the checkpointer receives a SIGHUP signal to update its configuration,
it may need to update the shared memory for full_page_writes and need to
write a WAL record for it.  Now, it is quite possible that the XLOG
machinery has not been initialized by that time and it will lead to
assertion failure while doing that.  Fix is to allow the initialization of
the XLOG machinery outside critical section.

This bug has been introduced by the commit 2c03216d83 which added the XLOG
machinery initialization in RecoveryInProgress code path.

Reported-by: Dilip Kumar
Author: Dilip Kumar
Reviewed-by: Michael Paquier and Amit Kapila
Backpatch-through: 9.5
Discussion: https://postgr.es/m/CAFiTN-u4BA8KXcQUWDPNgaKAjDXC=C2whnzBM8TAcv=stckYUw@mail.gmail.com
src/backend/access/transam/xlog.c