From: | Scott Ribe <scott_ribe(at)elevated-dev(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Re: measuring WAL creation |
Date: | 2024-08-02 21:13:16 |
Message-ID: | 5DF0805F-8B5F-441B-B991-7F77D5FA7BE2@elevated-dev.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
> On Aug 2, 2024, at 2:29 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Scott Ribe <scott_ribe(at)elevated-dev(dot)com> writes:
>> I'd like to measure both the amount of WAL created by a long series of data modifications and the compressed size of the generated WAL files.
>> I suppose I need to set wal_keep_size high, and pay attention to segment numbers to make sure it was high enough. Then I can look at segments created while the commands were running.
>
>> But question: can I simply delete all WAL after a clean shutdown?
>
> As a general rule, never do that manually --- the risk/reward ratio is
> unattractive. A checkpoint will release all safely-releasable WAL.
> You can checkpoint via a shutdown if you insist, but a plain
> CHECKPOINT command should be enough.
Oh, I thought at a checkpoint it would keep around some minimum, wal_keep_size, or wal_min_size. But I suppose I could set those to 0 if needed. Anyway, this would be a database solely for the purpose of running these tests, starting empty, so risk is not a factor unless I keep corrupting it between test stages ;-)
From | Date | Subject | |
---|---|---|---|
Next Message | Rajesh Kumar | 2024-08-06 04:32:14 | Connection exceeded alert. |
Previous Message | Tom Lane | 2024-08-02 20:29:19 | Re: measuring WAL creation |