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

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pg_rewind just doesn't fsync *anything*?
Дата
Msg-id CAB7nPqQ-UuqGKyaewY3d4xdfY=J5ssZpON=s4i-BZtTUB1wb0A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_rewind just doesn't fsync *anything*?  (Abhijit Menon-Sen <ams@2ndQuadrant.com>)
Ответы Re: pg_rewind just doesn't fsync *anything*?  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Thu, Mar 10, 2016 at 8:37 AM, Abhijit Menon-Sen <ams@2ndquadrant.com> wrote:
> At 2016-03-10 08:35:43 +0100, michael.paquier@gmail.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Abhijit Menon-Sen
Дата:
Сообщение: Re: pg_rewind just doesn't fsync *anything*?
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: POC: Cache data in GetSnapshotData()