pgsql: Fix checkpointer crash in EXEC_BACKEND builds.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix checkpointer crash in EXEC_BACKEND builds.
Date: 2014-07-24 13:18:48
Message-ID: E1XAIv2-0007Qy-Tj@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/3372f1adad12bc70321fdf22f3c11ac67e429f63

Modified Files
--------------
src/backend/access/transam/xlog.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2014-07-24 13:26:17 pgsql: Prevent shm_mq_send from reading uninitialized memory.
Previous Message Andres Freund 2014-07-24 12:45:05 pgsql: Properly remove ephemeral replication slots after a crash restar