Re: Add a perl function in Cluster.pm to generate WAL - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Add a perl function in Cluster.pm to generate WAL
Date
Msg-id ZYOTKV1MV7gDYpCV@paquier.xyz
Whole thread Raw
In response to Re: Add a perl function in Cluster.pm to generate WAL  ("Euler Taveira" <euler@eulerto.com>)
Responses Re: Add a perl function in Cluster.pm to generate WAL
List pgsql-hackers
On Wed, Dec 20, 2023 at 12:24:04AM -0300, Euler Taveira wrote:
> LGTM.

I was eyeing at 020_messages.pl and it has a pg_switch_wal() after a
transaction rollbacked.  020_archive_status.pl creates a table, does
one segment switch, then a checkpoint (table is used afterwards).
Perhaps these could be changed with the new routine, but it does not
seem like this improves the readability of the tests, either, contrary
to the ones updated here where a fake table is created to force some
records.  What do you think?

We have a few more pg_switch_wal() calls, as well, but these rely on
WAL being already generated beforehand.

I have added a comment about pg_logical_emit_message() being in
non-transactional mode and the flush implied by pg_switch_wal() as
that's important, edited a bit the whole, then applied the patch.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: [PoC] Improve dead tuple storage for lazy vacuum
Next
From: Masahiko Sawada
Date:
Subject: Re: [PoC] Improve dead tuple storage for lazy vacuum