]> granicus.if.org Git - postgresql/commit
Fix checkpointer crash in EXEC_BACKEND builds.
authorRobert Haas <rhaas@postgresql.org>
Thu, 24 Jul 2014 13:04:59 +0000 (09:04 -0400)
committerRobert Haas <rhaas@postgresql.org>
Thu, 24 Jul 2014 13:12:38 +0000 (09:12 -0400)
commit250c26ba9cf247c2d5b8dbd2435a36d11382c43e
treeebe2f3ba60b4523e1f95af8789b6aabbbf19c1b6
parent93a028f569232fa498279841cb61ad11c2df5c85
Fix checkpointer crash in EXEC_BACKEND builds.

Nothing in the checkpointer calls InitXLOGAccess(), so WALInsertLocks
never got initialized there.  Without EXEC_BACKEND, it works anyway
because the correct value is inherited from the postmaster, but
with EXEC_BACKEND we've got a problem.  The problem appears to have
been introduced by commit 68a2e52bbaf98f136a96b3a0d734ca52ca440a95.

To fix, move the relevant initialization steps from InitXLOGAccess()
to XLOGShmemInit(), making this more parallel to what we do
elsewhere.

Amit Kapila
src/backend/access/transam/xlog.c