| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Scott Ribe <scott_ribe(at)elevated-dev(dot)com> |
| Cc: | Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: measuring WAL creation |
| Date: | 2024-08-02 20:29:19 |
| Message-ID: | 4023041.1722630559@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
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.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Scott Ribe | 2024-08-02 21:13:16 | Re: measuring WAL creation |
| Previous Message | Scott Ribe | 2024-08-02 19:16:06 | measuring WAL creation |