From: | Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: END_OF_RECOVERY shutdowns and ResetUnloggedRelations() |
Date: | 2014-10-27 10:39:30 |
Message-ID: | 20141027103930.GA1629@toroid.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At 2014-09-25 22:41:18 +0200, andres(at)2ndquadrant(dot)com wrote:
>
> On 2014-09-24 17:06:05 +0530, Abhijit Menon-Sen wrote:
> >
> > 1. Move the call to ResetUnloggedRelations(UNLOGGED_RELATION_INIT) to
> > earlier in StartupXLOG.
> >
> > 2. Inside that function, issue fsync()s for the main forks we create by
> > copying the _init fork.
>
> These two imo should definitely be backpatched.
I've attached updated versions of these two patches. The only changes
are to revise the comments as you suggested.
> > 3. A small fixup to add a const to "typedef char *FileName", because the
> > earlier patch gave me warnings about discarding const-ness. This is
> > consistent with many other functions in fd.c that take const char *.
>
> I'm happy with consider that one for master (although I seem to recall
> having had a patch for it rejected?), but I don't think we want to do
> that in the backbranches.
(I gave up on this for now as an unrelated diversion.)
> > 4. Issue an fsync() on the data directory at startup if we need to
> > perform crash recovery.
>
> I personally think this one should be backpatched too. Does anyone
> believe differently?
I revised this patch as well, I'll rebase and send it separately along
with the initdb -S patch shortly.
-- Abhijit
Attachment | Content-Type | Size |
---|---|---|
0001-Call-ResetUnloggedRelations-UNLOGGED_RELATION_INIT-e.patch | text/x-diff | 2.1 KB |
0002-Make-ResetUnloggedRelations-_INIT-fsync-newly-create.patch | text/x-diff | 2.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2014-10-27 10:51:01 | Re: Function array_agg(array) |
Previous Message | Petr Jelinek | 2014-10-27 10:37:34 | Re: Better support of exported snapshots with pg_dump |