Re: Minimal logical decoding on standbys

From: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com>, Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com>, fabriziomello(at)gmail(dot)com, tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>, Rahila Syed <rahila(dot)syed(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Melanie Plageman <melanieplageman(at)gmail(dot)com>
Subject: Re: Minimal logical decoding on standbys
Date: 2023-04-02 08:27:45
Message-ID: 2b2a2ceb-4d8a-58aa-212e-3b5f5b3c54c3@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 4/2/23 5:42 AM, Andres Freund wrote:
> Hi,
>
> On 2023-03-31 12:45:51 +0200, Drouvot, Bertrand wrote:
>
> I pushed a commit just adding an assertion that only valid bits are passed in.
>
>

Thanks!

>>> I'm also thinking of splitting the patch into two. One patch to pass down the
>>> heap relation into the new places, and another for the rest.
>>
>> I think that makes sense. I don't know how far you've work on the split but please
>> find attached V54 doing such a split + implementing your VISIBILITYMAP_XLOG_VALID_BITS
>> suggestion.
>
> I pushed the pass-the-relation part.

Thanks! I just created a new thread [1] for passing down the heap relation to GlobalVisTestFor() in
vacuumRedirectAndPlaceholder().

> I removed an include of catalog.h that
> was in the patch - I suspect it might have slipped in there from a later patch
> in the series...
>

Oops, my bad. Thanks! Yeah, indeed it's due to the split and it's in fact needed in "Add-info-in-WAL-records-in-preparation-for-logic.patch".

Please find enclosed v55 with the correction (re-adding it Add-info-in-WAL-records-in-preparation-for-logic.patch as compare to v54).

> I was a bit bothered by using 'heap' instead of 'table' in so many places
> (eventually we imo should standardize on the latter), but looking around the
> changed places, heap was used for things like buffers etc.

yup

[1]: https://www.postgresql.org/message-id/flat/02392033-f030-a3c8-c7d0-5c27eb529fec%40gmail.com

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v55-0006-Doc-changes-describing-details-about-logical-dec.patch text/plain 2.2 KB
v55-0005-New-TAP-test-for-logical-decoding-on-standby.patch text/plain 32.9 KB
v55-0004-Fixing-Walsender-corner-case-with-logical-decodi.patch text/plain 7.7 KB
v55-0003-Allow-logical-decoding-on-standby.patch text/plain 11.8 KB
v55-0002-Handle-logical-slot-conflicts-on-standby.patch text/plain 37.2 KB
v55-0001-Add-info-in-WAL-records-in-preparation-for-logic.patch text/plain 18.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Phil Florent 2023-04-02 09:55:47 Support logical replication of DDLs
Previous Message Drouvot, Bertrand 2023-04-02 08:23:47 Pass heaprel to GlobalVisTestFor() in vacuumRedirectAndPlaceholder()