public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ranier Vilela <[email protected]>
To: Pg Hackers <[email protected]>
To: [email protected] <[email protected]>
To: Thomas Munro <[email protected]>
To: Peter Eisentraut <[email protected]>
Subject: Re: CREATE DATABASE with filesystem cloning
Date: Tue, 7 May 2024 10:28:19 -0300
Message-ID: <CAEudQAowFaOJfBw_=+f1QLvOKE5F4sMNdFPuiuuyyNWXGik6bA@mail.gmail.com> (raw)
Hi,
Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> wrote:
>Any kind of feedback would be appreciated.
I know it's coming from copy-and-paste, but
I believe the flags could be:
- dstfd = OpenTransientFile(tofile, O_RDWR | O_CREAT | O_EXCL | PG_BINARY);
+ dstfd = OpenTransientFile(tofile, O_CREAT | O_WRONLY | O_TRUNC | O_EXCL |
PG_BINARY);
The flags:
O_WRONLY | O_TRUNC
Allow the OS to make some optimizations, if you deem it possible.
The flag O_RDWR indicates that the file can be read, which is not true in
this case.
The destination file will just be written.
best regards,
Ranier Vilela
view thread (2+ 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]
Subject: Re: CREATE DATABASE with filesystem cloning
In-Reply-To: <CAEudQAowFaOJfBw_=+f1QLvOKE5F4sMNdFPuiuuyyNWXGik6bA@mail.gmail.com>
* 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