Re: END_OF_RECOVERY shutdowns and ResetUnloggedRelations()

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>
Subject: Re: END_OF_RECOVERY shutdowns and ResetUnloggedRelations()
Date: 2014-09-12 18:44:48
Message-ID: CA+TgmoYCTDq=fsoz3Gb9=D=35Qjz62XAjtavTLqqC-VjUKK2NQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 12, 2014 at 7:22 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> What I like even less is that pg_control is actually marked as
> DB_SHUTDOWNED due to END_OF_RECOVERY. That's just plain wrong. Obviously
> the database was *NOT* shutdown peacefully. I don't see active bugs due
> it besides this, but I think it's likely to either have or create futher
> ones.

I agree. The database clearly isn't shut down at end of recovery;
it's still active and we're still doing things to it. If we crash at
that point, we need to go back into recovery on restart. This seems
open and shut, but maybe I'm missing something. Why shouldn't we fix
*that*?

With regard to your second email, I agree that
ResetUnloggedRelation(UNLOGGED_RELATION_INIT) needs to issue fsyncs.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Smith 2014-09-12 18:44:54 Re: Support for N synchronous standby servers
Previous Message Andrew Gierth 2014-09-12 18:41:24 Re: Final Patch for GROUPING SETS