Re: END_OF_RECOVERY shutdowns and ResetUnloggedRelations()

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: END_OF_RECOVERY shutdowns and ResetUnloggedRelations()
Date: 2014-09-12 11:27:30
Message-ID: 20140912112730.GB4984@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2014-09-12 13:22:46 +0200, Andres Freund wrote:
> Because at least the former is something that obviously we can't (and
> don't want) to change in the back branches I think the solution for this
> particular problem is to simply move the ResetUnloggedRelations() call a
> couple lines up to before the CreateCheckPoint(). That should fix this.
>
> Comments, other opinions?

A second thing I realized, just after hitting send, is that I think
ResetUnloggedRelations(UNLOGGED_RELATION_INIT) actually has to fsync the
created files. As we rely on the !init relations being there they really
need to be fsynced. During normal running that's ensured via the smgr
during checkpoints, but that's not the case here.

Greetings,

Andres Freund

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2014-09-12 11:27:35 expanded mode is still broken
Previous Message Andres Freund 2014-09-12 11:22:46 END_OF_RECOVERY shutdowns and ResetUnloggedRelations()