pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedwal_init_zero / wal_recycle
4+ messages / 3 participants
[nested] [flat]
* wal_init_zero / wal_recycle
@ 2024-04-24 08:08 Nicolas Seinlet <nicolas@seinlet.eu>
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Seinlet @ 2024-04-24 08:08 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
Hello,
while searching the doc to solve an issue, I found the interdependency between those 2 parameters was not obvious.
Here:
https://www.postgresql.org/docs/14/runtime-config-wal.html#GUC-WAL-INIT-ZERO
the wal_init_zero set to ON cause new WAL files to be filled with zeroes.
It was not crystal clear to me that when wal_recycle is also ON , the recycled files are not filled with zeroes, because they are not considered as new. Could we add a sentence stating this?
Thanks for reading me,
Nicolas.
Attachments:
[application/pgp-keys] publickey - nicolas@seinlet.eu - 0x6AE98DAA.asc (649B, ../../RJJj1ukTJZsa_MAFNEbpU3318pUYUiRkDe0KL6YQFNOhT3d8zEtLq4fNTBklHiLJj_yVw0fVMJXzoEjyihF7K7SNVXB54civYYpyEHvONTo=@seinlet.eu/3-publickey%20-%20nicolas@seinlet.eu%20-%200x6AE98DAA.asc)
download
[application/pgp-signature] signature.asc (247B, ../../RJJj1ukTJZsa_MAFNEbpU3318pUYUiRkDe0KL6YQFNOhT3d8zEtLq4fNTBklHiLJj_yVw0fVMJXzoEjyihF7K7SNVXB54civYYpyEHvONTo=@seinlet.eu/4-signature.asc)
download
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: wal_init_zero / wal_recycle
@ 2024-04-24 08:57 Peter Eisentraut <peter@eisentraut.org>
parent: Nicolas Seinlet <nicolas@seinlet.eu>
0 siblings, 2 replies; 4+ messages in thread
From: Peter Eisentraut @ 2024-04-24 08:57 UTC (permalink / raw)
To: Nicolas Seinlet <nicolas@seinlet.eu>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
On 24.04.24 10:08, Nicolas Seinlet wrote:
> while searching the doc to solve an issue, I found the interdependency
> between those 2 parameters was not obvious.
>
> Here:
> https://www.postgresql.org/docs/14/runtime-config-wal.html#GUC-WAL-INIT-ZERO <https://www.postgresql.org/docs/14/runtime-config-wal.html#GUC-WAL-INIT-ZERO;
>
> the wal_init_zero set to ON cause new WAL files to be filled with zeroes.
>
> It was not crystal clear to me that when wal_recycle is also ON , the
> recycled files are not filled with zeroes, because they are not
> considered as new. Could we add a sentence stating this?
It currently says:
wal_init_zero: "... causes new WAL files to be filled with zeroes ..."
wal_recycle: "... avoiding the need to create new ones ..."
I'm not sure where exactly to make that more clear.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: wal_init_zero / wal_recycle
@ 2024-04-24 09:17 Nicolas Seinlet <nicolas@seinlet.eu>
parent: Peter Eisentraut <peter@eisentraut.org>
1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Seinlet @ 2024-04-24 09:17 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
On Wednesday, April 24th, 2024 at 10:57, Peter Eisentraut <peter@eisentraut.org> wrote:
> It currently says:
>
> wal_init_zero: "... causes new WAL files to be filled with zeroes ..."
>
> wal_recycle: "... avoiding the need to create new ones ..."
>
> I'm not sure where exactly to make that more clear.
You're completely right. It was not obvious to me that recycled files are not considered new, and consequently not filled by zeroes.
Nicolas.
Attachments:
[application/pgp-keys] publickey - nicolas@seinlet.eu - 0x6AE98DAA.asc (649B, ../../mnFsLnaxxfJUMYlBFHCymD2LER4_3UNp0bg64IufOsnCkSEz1Tdm_R7qTn98YWJvzv6ltPOKOujTBage5Nqll6rOuSQZzYr2HEWElWZg22s=@seinlet.eu/2-publickey%20-%20nicolas@seinlet.eu%20-%200x6AE98DAA.asc)
download
[application/pgp-signature] signature.asc (247B, ../../mnFsLnaxxfJUMYlBFHCymD2LER4_3UNp0bg64IufOsnCkSEz1Tdm_R7qTn98YWJvzv6ltPOKOujTBage5Nqll6rOuSQZzYr2HEWElWZg22s=@seinlet.eu/3-signature.asc)
download
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: wal_init_zero / wal_recycle
@ 2024-04-25 08:25 Alvaro Herrera <alvherre@alvh.no-ip.org>
parent: Peter Eisentraut <peter@eisentraut.org>
1 sibling, 0 replies; 4+ messages in thread
From: Alvaro Herrera @ 2024-04-25 08:25 UTC (permalink / raw)
To: Peter Eisentraut <peter@eisentraut.org>; +Cc: Nicolas Seinlet <nicolas@seinlet.eu>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
On 2024-Apr-24, Peter Eisentraut wrote:
> On 24.04.24 10:08, Nicolas Seinlet wrote:
> > It was not crystal clear to me that when wal_recycle is also ON , the
> > recycled files are not filled with zeroes, because they are not
> > considered as new. Could we add a sentence stating this?
>
> It currently says:
>
> wal_init_zero: "... causes new WAL files to be filled with zeroes ..."
>
> wal_recycle: "... avoiding the need to create new ones ..."
>
> I'm not sure where exactly to make that more clear.
It may be too subtle. Maybe we could add a note at the end:
wal_init_zero (boolean)
If set to on (the default), this option causes new WAL files to be filled with
zeroes. On some file systems, this ensures that space is allocated before we
need to write WAL records. However, Copy-On-Write (COW) file systems may not
benefit from this technique, so the option is given to skip the unnecessary
work. If set to off, only the final byte is written when the file is created so
that it has the expected size. >>Note that recycled WAL files are for these
purposes not considered new.<<
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
"Pero la cosa no es muy grave ..." (le petit Nicolas -- René Goscinny)
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2024-04-25 08:25 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-04-24 08:08 wal_init_zero / wal_recycle Nicolas Seinlet <nicolas@seinlet.eu>
2024-04-24 08:57 ` Peter Eisentraut <peter@eisentraut.org>
2024-04-24 09:17 ` Nicolas Seinlet <nicolas@seinlet.eu>
2024-04-25 08:25 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
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