Re: pgsql: rm_cleanup functions need to be allowed to write WAL entries.

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)postgresql(dot)org>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: rm_cleanup functions need to be allowed to write WAL entries.
Date: 2009-08-08 10:05:35
Message-ID: 1249725935.4839.129.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2009-08-08 16:39:17 pgsql: Document that LocalSetXLogInsertAllowed can be re-executed.
Previous Message Tom Lane 2009-08-07 22:48:34 pgsql: Modify parallel pg_restore to track pending and ready items by