Re: should frontend tools use syncfs() ? - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: should frontend tools use syncfs() ?
Date
Msg-id ZO6JB3s4EepXvSBn@paquier.xyz
Whole thread Raw
In response to Re: should frontend tools use syncfs() ?  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: should frontend tools use syncfs() ?  (Nathan Bossart <nathandbossart@gmail.com>)
List pgsql-hackers
On Tue, Aug 29, 2023 at 08:45:59AM -0700, Nathan Bossart wrote:
> rebased

0001 looks OK, worth its own, independent, commit.

I understand that I'm perhaps sounding pedantic about fsync_pgdata()..
But, after thinking more about it, I would still make this code fail
hard with an exit(EXIT_FAILURE) to let any C code calling directly
this routine with sync_method = DATA_DIR_SYNC_METHOD_SYNCFS know that
the build does not allow the use of this option when we don't have
HAVE_SYNCFS.  parse_sync_method() offers some protection, but adding
this restriction also in the execution path is more friendly than
falling back silently to the default of flushing each file if
fsync_pgdata() is called with syncfs but the build does not support
it.  At least that's more predictible.

I'm fine with the doc changes.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pg_stat_get_backend_subxact() and backend IDs?
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Standardize spelling of "power of two"