Re: pgsql: rm_cleanup functions need to be allowed to write WAL entries. - Mailing list pgsql-committers

From Simon Riggs
Subject Re: pgsql: rm_cleanup functions need to be allowed to write WAL entries.
Date
Msg-id 1249725935.4839.129.camel@ebony.2ndQuadrant
Whole thread Raw
In response to pgsql: rm_cleanup functions need to be allowed to write WAL entries.  (tgl@postgresql.org (Tom Lane))
Responses Re: pgsql: rm_cleanup functions need to be allowed to write WAL entries.
List pgsql-committers
On Fri, 2009-08-07 at 19:29 +0000, Tom Lane wrote:
> Log Message:
> -----------
> rm_cleanup functions need to be allowed to write WAL entries.  This oversight
> appears to explain the recent reports of "PANIC: cannot make new WAL entries
> during recovery".
>
> Modified Files:
> --------------
>     pgsql/src/backend/access/transam:
>         xlog.c (r1.345 -> r1.346)
>         (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c?r1=1.345&r2=1.346)

I was just working on a patch after the comments yesterday, hadn't
noticed you'd committed.

The first chunk is exactly as I was going to suggest. Make an explicit
state change in the startup process.

Resetting it back seems fragile, since in crash recovery we call it
again almost immediately during CreateCheckPoint(). That only works if
LocalSetXLogInsertAllowed() has no side effects. I understand Heikki's
wish to have safeguards in place, so we should document that
LocalSetXLogInsertAllowed() can be executed twice without problem.

--
 Simon Riggs           www.2ndQuadrant.com


pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Modify parallel pg_restore to track pending and ready items by
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Document that LocalSetXLogInsertAllowed can be re-executed.