Re: pg_rewind just doesn't fsync *anything*?

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Subject: Re: pg_rewind just doesn't fsync *anything*?
Date: 2016-03-10 07:47:16
Message-ID: CAB7nPqQ-UuqGKyaewY3d4xdfY=J5ssZpON=s4i-BZtTUB1wb0A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 10, 2016 at 8:37 AM, Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com> wrote:
> At 2016-03-10 08:35:43 +0100, michael(dot)paquier(at)gmail(dot)com wrote:
>>
>> > I guess the easiest fix would be to shell out to initdb -s?
>>
>> What do you mean? I am not sure what initdb has to do with that as we
>> have no need for it in pg_rewind.
>
> initdb -S/--sync-only fsyncs everything in the data directory and exits.

Missed your point, good to know that initdb is not doing anything else
with -S than fsyncing everything in PGDATA. Still, I think that we had
better fsync only entries that are modified by pg_rewind, and files
that got updated, and not the whole directory, a target data folder
should be stopped properly to be able to rewind, and it is better to
avoid dependencies between utilities if that's not strictly necessary.
initdb is likely to be installed side-by-side with pg_rewind in any
distribution though.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Torsten Zühlsdorff 2016-03-10 07:49:12 Re: [HACKERS] How can we expand PostgreSQL ecosystem?
Previous Message Abhijit Menon-Sen 2016-03-10 07:37:39 Re: pg_rewind just doesn't fsync *anything*?