Re: END_OF_RECOVERY shutdowns and ResetUnloggedRelations() - Mailing list pgsql-hackers

From Andres Freund
Subject Re: END_OF_RECOVERY shutdowns and ResetUnloggedRelations()
Date
Msg-id 20140912112730.GB4984@alap3.anarazel.de
Whole thread Raw
In response to END_OF_RECOVERY shutdowns and ResetUnloggedRelations()  (Andres Freund <andres@2ndquadrant.com>)
List 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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: END_OF_RECOVERY shutdowns and ResetUnloggedRelations()
Next
From: Pavel Stehule
Date:
Subject: expanded mode is still broken