Re: How to generate a WAL record spanning multiple WAL files?

From: Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: How to generate a WAL record spanning multiple WAL files?
Date: 2022-04-05 14:09:42
Message-ID: CAKU4AWqsg3TuuvfrQbZqRvnyk6ZgW0S5cRue5CfRvNipSyks=A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Tue, Apr 5, 2022 at 9:46 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
wrote:

> On 2022-Apr-05, Bharath Rupireddy 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.
>
> It's easier to use pg_logical_emit_message().
>
>
Not sure I understand the question correctly here. What if I use the below
code
where the len might be very large? like 64MB.

XLogBeginInsert();
XLogRegisterData((char *)&xl_append, sizeof(xl_cstore_append));
XLogRegisterData((char *)data, len);

XLogInsert(..);

--
Best Regards
Andy Fan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2022-04-05 14:16:36 Re: Mingw task for Cirrus CI
Previous Message Tom Lane 2022-04-05 14:06:54 Re: Mark all GUC variable as PGDLLIMPORT