Re: How to generate a WAL record spanning multiple WAL files? - Mailing list pgsql-hackers

From Matthias van de Meent
Subject Re: How to generate a WAL record spanning multiple WAL files?
Date
Msg-id CAEze2WhZME=N1KgvFgJS+G78PDA1hq0o+pNEc_gLVrjqQk-efQ@mail.gmail.com
Whole thread Raw
In response to How to generate a WAL record spanning multiple WAL files?  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
List pgsql-hackers
On Tue, 5 Apr 2022 at 15:13, Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
>
> Hi,
>
> I wanted to have a WAL record spanning multiple WAL files of size, say
> 16MB. I'm wondering if the Full Page Images (FPIs) of a TOAST table
> would help here. Please let me know if there's any way to generate
> such large WAL records.

The function pg_logical_emit_message (callable with REPLICATION
permissions from SQL) allows you to emit records of arbitrary length <
2GB - 2B (for now), which should be enough.

Other than that, you could try to generate 16MB of subtransaction IDs;
the commit record would contain all subxids and thus be at least 16MB
in size.

-Matthias



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Handle infinite recursion in logical replication setup
Next
From: Robert Haas
Date:
Subject: Re: API stability [was: pgsql: Fix possible recovery trouble if TRUNCATE overlaps a checkpoint.]