public inbox for [email protected]
help / color / mirror / Atom feedFrom: Nathan Bossart <[email protected]>
To: Andres Freund <[email protected]>
Cc: Andy Fan <[email protected]>
Cc: Justin Pryzby <[email protected]>
Cc: Maxim Orlov <[email protected]>
Cc: Pavel Borisov <[email protected]>
Cc: Bossart, Nathan <[email protected]>
Cc: Maxim Orlov <[email protected]>
Cc: [email protected]
Subject: Re: Pre-allocating WAL files
Date: Wed, 22 Jan 2025 11:43:20 -0600
Message-ID: <Z5EuOBav0sc_vG9c@nathan> (raw)
In-Reply-To: <745zvagaf6tfn2zbvtmqvxsr6kmybjbzcw6rsm55jnql4233je@tudeipoewruo>
References: <[email protected]>
<20220301150704.GA1030078@nathanxps13>
<20220317231212.GB1415284@nathanxps13>
<20220408203003.GA1630183@nathanxps13>
<[email protected]>
<Z4_C04ZJ_SymvYes@nathan>
<Z4_Hmj2R8NXnAI-K@nathan>
<vfhyldq3rtnwd4uxbb7ro2opmvbmfswvkycavmzcqb55mmo4jk@g2d2n6xnwicb>
<[email protected]>
<745zvagaf6tfn2zbvtmqvxsr6kmybjbzcw6rsm55jnql4233je@tudeipoewruo>
On Wed, Jan 22, 2025 at 11:21:03AM -0500, Andres Freund wrote:
> fsync(open(oldname1));
> fsync(open(oldname2));
> ..
> fsync(open(oldnameN));
>
> rename(oldname1, newname1);
> rename(oldname2, newname2);
> ..
> rename(oldnameN, newnameN);
>
> fsync(open(newname1));
> fsync(open(newname2));
> ..
> fsync(open(newnameN));
>
> fsync(open("pg_wal"));
What is the purpose of syncing the file before the rename?
--
nathan
view thread (17+ messages) latest in thread
reply
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Pre-allocating WAL files
In-Reply-To: <Z5EuOBav0sc_vG9c@nathan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox