From: Michael Paquier <michael@paquier.xyz>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: David Steele <david@pgmasters.net>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Brown <michael.brown@discourse.org>
Cc: pgsql-hackers@postgresql.org
Subject: Re: should frontend tools use syncfs() ?
Date: Thu, 31 Aug 2023 14:30:33 +0900
Message-ID: <ZPAleai+hsW26++B@paquier.xyz> (raw)
In-Reply-To: <20230830011408.GA2269049@nathanxps13>
References: <20230818160111.GA189711@nathanxps13>
<ZOP5qoUualu5xl2Z@paquier.xyz>
<20230822014407.GA449131@nathanxps13>
<ZOQUSbi8bD1nhxb4@paquier.xyz>
<20230822020632.GA565843@nathanxps13>
<ZOQxUU7F85hDQpRO@paquier.xyz>
<20230822171110.GA711171@nathanxps13>
<20230829154559.GA2136737@nathanxps13>
<ZO6JB3s4EepXvSBn@paquier.xyz>
<20230830011408.GA2269049@nathanxps13>
On Tue, Aug 29, 2023 at 06:14:08PM -0700, Nathan Bossart wrote:
> That seems fair enough. I did this in v7. I restructured fsync_pgdata()
> and fsync_dir_recurse() so that any new sync methods should cause compiler
> warnings until they are implemented.
That's pretty cool and easier to maintain in the long term.
After sleeping on it, there are two things that popped up in my mind
that may be worth considering:
- Should we have some regression tests? We should only need one test
in one of the binaries to be able to stress the new code paths of
file_utils.c with syncfs. The cheapest one may be pg_dump with a
dump in directory format? Note that we have tests there that depend
on lz4 or gzip existing, which are conditional.
- Perhaps 0002 should be split into two parts? The first patch could
introduce DataDirSyncMethod in file_utils.h with the new routines in
file_utils.h (including syncfs support), and the second patch would
plug the new option to all the binaries. In the first patch, I would
hardcode DATA_DIR_SYNC_METHOD_FSYNC.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (832B, ../ZPAleai+hsW26++B@paquier.xyz/2-signature.asc)
download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: michael@paquier.xyz, nathandbossart@gmail.com, pryzby@telsasoft.com, thomas.munro@gmail.com, david@pgmasters.net, masao.fujii@oss.nttdata.com, bruce@momjian.us, tgl@sss.pgh.pa.us, michael.brown@discourse.org
Subject: Re: should frontend tools use syncfs() ?
In-Reply-To: <ZPAleai+hsW26++B@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox