From: Laurenz Albe <laurenz.albe@cybertec.at>
To: James Pang (chaolpan) <chaolpan@cisco.com>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: max_wal_size and wal_keep_size
Date: Tue, 30 Aug 2022 19:29:17 +0200
Message-ID: <d56da8fc92109960f24fb805e17d1be5fe5d0adb.camel@cybertec.at> (raw)
In-Reply-To: <PH0PR11MB5191C07FD18F7363DD973D9ED6799@PH0PR11MB5191.namprd11.prod.outlook.com>
References: <PH0PR11MB5191D04014D2F4F2FD2506BAD6779@PH0PR11MB5191.namprd11.prod.outlook.com>
<CAMkU=1xcS0LDvvThkkSgpNwT8XvJ5TV0V0_v+b_4fMugcf+y8g@mail.gmail.com>
<PH0PR11MB5191C07FD18F7363DD973D9ED6799@PH0PR11MB5191.namprd11.prod.outlook.com>
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
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-admin@postgresql.org
Cc: laurenz.albe@cybertec.at, chaolpan@cisco.com, jeff.janes@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: max_wal_size and wal_keep_size
In-Reply-To: <d56da8fc92109960f24fb805e17d1be5fe5d0adb.camel@cybertec.at>
* 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