pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedmax_wal_size and wal_keep_size
4+ messages / 3 participants
[nested] [flat]
* max_wal_size and wal_keep_size
@ 2022-08-28 12:45 James Pang (chaolpan) <chaolpan@cisco.com>
2022-08-28 14:52 ` Re: max_wal_size and wal_keep_size Jeff Janes <jeff.janes@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: James Pang (chaolpan) @ 2022-08-28 12:45 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Hi,
It's PGv13, what's relationship between max_wal_size and wal_keep_size ? For example, wal_keep_size=200GB(to keep enough wal on disk pg_wal) , what's best value for max_wal_size ? we want to usage max_wal_size to control checkpoint .
Thanks,
James
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: max_wal_size and wal_keep_size
2022-08-28 12:45 max_wal_size and wal_keep_size James Pang (chaolpan) <chaolpan@cisco.com>
@ 2022-08-28 14:52 ` Jeff Janes <jeff.janes@gmail.com>
2022-08-30 08:29 ` RE: max_wal_size and wal_keep_size James Pang (chaolpan) <chaolpan@cisco.com>
0 siblings, 1 reply; 4+ messages in thread
From: Jeff Janes @ 2022-08-28 14:52 UTC (permalink / raw)
To: James Pang (chaolpan) <chaolpan@cisco.com>; +Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
On Sun, Aug 28, 2022 at 8:46 AM James Pang (chaolpan) <chaolpan@cisco.com>
wrote:
> Hi,
>
> It’s PGv13, what’s relationship between max_wal_size and wal_keep_size ?
> For example, wal_keep_size=200GB(to keep enough wal on disk pg_wal) ,
> what’s best value for max_wal_size ? we want to usage max_wal_size to
> control checkpoint .
>
The settings are independent. Do you think your checkpoints are
occurring too often or not often enough? (After an unclean shutdown does
it take too long for the system to come back up again?)
Cheers,
Jeff
^ permalink raw reply [nested|flat] 4+ messages in thread
* RE: max_wal_size and wal_keep_size
2022-08-28 12:45 max_wal_size and wal_keep_size James Pang (chaolpan) <chaolpan@cisco.com>
2022-08-28 14:52 ` Re: max_wal_size and wal_keep_size Jeff Janes <jeff.janes@gmail.com>
@ 2022-08-30 08:29 ` James Pang (chaolpan) <chaolpan@cisco.com>
2022-08-30 17:29 ` Re: max_wal_size and wal_keep_size Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 1 reply; 4+ messages in thread
From: James Pang (chaolpan) @ 2022-08-30 08:29 UTC (permalink / raw)
To: Jeff Janes <jeff.janes@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
We want keep more wal to give more room for data replication, in case of some delay , and need old wal data. So wan to set wal_keep_size , and want to increase max_wal-size a lot to make max_wal_size > wal_keep_size (it may > 1TB).
James
From: Jeff Janes <jeff.janes@gmail.com>
Sent: Sunday, August 28, 2022 10:53 PM
To: James Pang (chaolpan) <chaolpan@cisco.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: max_wal_size and wal_keep_size
On Sun, Aug 28, 2022 at 8:46 AM James Pang (chaolpan) <chaolpan@cisco.com<mailto:chaolpan@cisco.com>> wrote:
Hi,
It’s PGv13, what’s relationship between max_wal_size and wal_keep_size ? For example, wal_keep_size=200GB(to keep enough wal on disk pg_wal) , what’s best value for max_wal_size ? we want to usage max_wal_size to control checkpoint .
The settings are independent. Do you think your checkpoints are occurring too often or not often enough? (After an unclean shutdown does it take too long for the system to come back up again?)
Cheers,
Jeff
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: max_wal_size and wal_keep_size
2022-08-28 12:45 max_wal_size and wal_keep_size James Pang (chaolpan) <chaolpan@cisco.com>
2022-08-28 14:52 ` Re: max_wal_size and wal_keep_size Jeff Janes <jeff.janes@gmail.com>
2022-08-30 08:29 ` RE: max_wal_size and wal_keep_size James Pang (chaolpan) <chaolpan@cisco.com>
@ 2022-08-30 17:29 ` Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 0 replies; 4+ messages in thread
From: Laurenz Albe @ 2022-08-30 17:29 UTC (permalink / raw)
To: James Pang (chaolpan) <chaolpan@cisco.com>; Jeff Janes <jeff.janes@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
On Tue, 2022-08-30 at 08:29 +0000, James Pang (chaolpan) wrote:
> We want keep more wal to give more room for data replication, in case of some delay ,
> and need old wal data. So wan to set wal_keep_size , and want to increase
> max_wal-size a lot to make max_wal_size > wal_keep_size (it may > 1TB).
The two parameters are independent:
- "max_wal_size" does *not* determine the maximum WAL size, but how much
WAL can be produced before the next checkpoint is triggered.
- "wal_keep_size" determines how much old WAL is kept around.
Set "wal_keep_size" and leave "max_wal_size" unchanged.
Or even better, use a replication slot.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2022-08-30 17:29 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-08-28 12:45 max_wal_size and wal_keep_size James Pang (chaolpan) <chaolpan@cisco.com>
2022-08-28 14:52 ` Jeff Janes <jeff.janes@gmail.com>
2022-08-30 08:29 ` James Pang (chaolpan) <chaolpan@cisco.com>
2022-08-30 17:29 ` Laurenz Albe <laurenz.albe@cybertec.at>
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