Re: Creation of an empty table is not fsync'd at checkpoint

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: Creation of an empty table is not fsync'd at checkpoint
Дата
Msg-id CA+hUKGKtz8DEuc846FrhFU53HzrVWFMf_=z62b0==H=SmCANJA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Creation of an empty table is not fsync'd at checkpoint  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Fri, Jan 28, 2022 at 12:36 PM Andres Freund <andres@anarazel.de> wrote:
> On 2022-01-28 00:39:22 +0200, Heikki Linnakangas wrote:
> > On 28/01/2022 00:11, Thomas Munro wrote:
> > > ... but we still never synchronize "base/5".  According to our
> > > project's reading of the POSIX tea leaves we should be doing that to
> > > nail down the directory entry.
> >
> > Really? 'base/5' is fsync'd by initdb, when it's created. I didn't think we
> > try to fsync() the directory, when a new file is created in it.
>
> I've not heard of concrete reports of it being needed (whereas the directory
> fsync being needed after a rename() is pretty easy to be reproduce). There's
> some technical reasons why it'd make sense for it to only be really needed for
> things after the initial file creation, but I'm not sure it's a good idea to
> rely on it.

I don't personally know of any system where that would break either.
I base my paranoia on man pages and the Austin Group's famous open
ticket 0000672.  Those don't mention special treatment for O_CREAT,
though I get the technical reason why it's different.  I think we
should probably do something about that even if it's hypothetical, but
I'm happy to call it a separate topic and follow up later (like commit
aca74843 did for SLRUs).



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

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Is there a way (except from server logs) to know the kind of on-going/last checkpoint?
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: Is there a way (except from server logs) to know the kind of on-going/last checkpoint?