Re: [COMMITTERS] pgsql: Properly set relpersistence for fake relcache entries.

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, "devrim(at)gunduz(dot)org" <devrim(at)gunduz(dot)org>
Subject: Re: [COMMITTERS] pgsql: Properly set relpersistence for fake relcache entries.
Date: 2012-09-15 19:00:13
Message-ID: 201209152100.13244.andres@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Saturday, September 15, 2012 06:29:25 PM Tom Lane wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > Definitions aside, I think it's a pretty scary issue. It basically means
> > that if you have a recovery (crash or archive) during which you read a
> > buffer into memory, the buffer won't be checkpointed. So if, before the
> > buffer is next evicted, you have a crash, and if at least one checkpoint
> > has intervened between the most recent WAL-logged operation on the
> > buffer and the crash, you're hosed. That's not a terribly unlikely
> > scenario.
>
> This is only an issue on standby slaves or when doing a PITR recovery, no?
> As far as I can tell from the discussion, it would not affect crash
> recovery, because we don't do restartpoints during crash recovery.
I think unfortunately it does. At the end of recovery we perform a
END_OF_RECOVERY checkpoint that seems to suffer from these issues. While
CreateCheckPoint() itself treats that kind of checkpoint similarly to a
shutdown checkpoint it doesn't pass that similarity to BufferSync (via
CheckPointGuts->CheckPointBuffers).

I hope I missed something ...

Greetings,

Andres
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2012-09-16 02:39:51 Re: Re: [COMMITTERS] pgsql: Properly set relpersistence for fake relcache entries.
Previous Message Tom Lane 2012-09-15 16:29:25 Re: Re: [COMMITTERS] pgsql: Properly set relpersistence for fake relcache entries.

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2012-09-16 00:31:50 _FORTIFY_SOURCE by default?
Previous Message Fujii Masao 2012-09-15 18:44:19 Re: [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown