public inbox for [email protected]  
help / color / mirror / Atom feed
measuring WAL creation
3+ messages / 2 participants
[nested] [flat]

* measuring WAL creation
@ 2024-08-02 19:16 Scott Ribe <[email protected]>
  2024-08-02 20:29 ` Re: measuring WAL creation Tom Lane <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Scott Ribe @ 2024-08-02 19:16 UTC (permalink / raw)
  To: Pgsql-admin <[email protected]>

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?

--
Scott Ribe
[email protected]
https://www.linkedin.com/in/scottribe/








^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: measuring WAL creation
  2024-08-02 19:16 measuring WAL creation Scott Ribe <[email protected]>
@ 2024-08-02 20:29 ` Tom Lane <[email protected]>
  2024-08-02 21:13   ` Re: measuring WAL creation Scott Ribe <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2024-08-02 20:29 UTC (permalink / raw)
  To: Scott Ribe <[email protected]>; +Cc: Pgsql-admin <[email protected]>

Scott Ribe <[email protected]> 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





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: measuring WAL creation
  2024-08-02 19:16 measuring WAL creation Scott Ribe <[email protected]>
  2024-08-02 20:29 ` Re: measuring WAL creation Tom Lane <[email protected]>
@ 2024-08-02 21:13   ` Scott Ribe <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Scott Ribe @ 2024-08-02 21:13 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: Pgsql-admin <[email protected]>

> On Aug 2, 2024, at 2:29 PM, Tom Lane <[email protected]> wrote:
> 
> Scott Ribe <[email protected]> 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 ;-)





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2024-08-02 21:13 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-08-02 19:16 measuring WAL creation Scott Ribe <[email protected]>
2024-08-02 20:29 ` Tom Lane <[email protected]>
2024-08-02 21:13   ` Scott Ribe <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox