Re: fsync-pgdata-on-recovery tries to write to more files than previously

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: fsync-pgdata-on-recovery tries to write to more files than previously
Дата
Msg-id 16539.1432655880@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: fsync-pgdata-on-recovery tries to write to more files than previously  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: fsync-pgdata-on-recovery tries to write to more files than previously  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> OK, I'm late to the party. But why exactly are we syncing absolutely 
> everything? That seems over-broad.

If we try to be selective, we risk errors of omission, which no one would
ever notice until someone's data got eaten in a low-probability crash
scenario.  It seems more robust (at least to me) to fsync everything we
can find.  That does require more thought about error cases than went
into the original patch ... but I think that we need more thought about
error cases even if we do try to be selective.

One thing perhaps we *should* be selective about, though, is which
symlinks we try to follow.  I think that a good case could be made
for ignoring symlinks everywhere except in the pg_tablespace directory.
If we did, that would all by itself take care of the Debian scenario,
if I understand that case correctly.

> And might it be better to check that we can open each file using 
> access() than calling open() and looking at the error code?

Don't really see the point; that's just an extra step, and access()
won't exactly prove you can open the file, anyway.
        regards, tom lane



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

Предыдущее
От: Paul Smith
Дата:
Сообщение: Re: ERROR: MultiXactId xxxx has not been created yet -- apparent wraparound
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: fsync-pgdata-on-recovery tries to write to more files than previously