Re: Minimal logical decoding on standbys

Bertrand Drouvot <bertranddrouvot.pg@gmail.com>

From: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>, Thomas Munro <thomas.munro@gmail.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, Ibrar Ahmed <ibrar.ahmad@gmail.com>, Amit Khandekar <amitdkhan.pg@gmail.com>, fabriziomello@gmail.com, tushar <tushar.ahuja@enterprisedb.com>, Rahila Syed <rahila.syed@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-02-13T15:27:20Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Reduce the log level in 035_standby_logical_decoding.pl.

  2. 035_standby_logical_decoding: Add missing waits for replication

  3. For cascading replication, wake physical and logical walsenders separately

  4. Handle logical slot conflicts on standby

  5. Support invalidating replication slots due to horizon and wal_level

  6. Prevent use of invalidated logical slot in CreateDecodingContext()

  7. Replace replication slot's invalidated_at LSN with an enum

  8. Pass down table relation into more index relation functions

  9. Assert only valid flag bits are passed to visibilitymap_set()

  10. Remove unused _bt_delitems_delete() argument.

  11. Add xl_btree_delete optimization.

Attachments

Hi,

On 2/7/23 4:29 PM, Drouvot, Bertrand wrote:
> Hi,
> 
> On 1/19/23 10:43 AM, Drouvot, Bertrand wrote:
>> Hi,
>>
>> On 1/19/23 3:46 AM, Andres Freund wrote:
>>> Hi,
>>>
>>> On 2023-01-18 11:24:19 +0100, Drouvot, Bertrand wrote:
>>>> On 1/6/23 4:40 AM, Andres Freund wrote:
>>>>> Hm, that's quite expensive. Perhaps worth adding a C helper that can do that
>>>>> for us instead? This will likely also be needed in real applications after all.
>>>>>
>>>>
>>>> Not sure I got it. What the C helper would be supposed to do?
>>>
>>> Call LogStandbySnapshot().
>>>
>>
>> Got it, I like the idea, will do.
>>
> 
> 0005 in V49 attached is introducing a new pg_log_standby_snapshot() function
> and the TAP test is making use of it.
> 
> Documentation about this new function is also added in the "Snapshot Synchronization Functions"
> section. I'm not sure that's the best place for it but did not find a better place yet.
> 

Attaching V50, tiny update in the TAP test (aka 0005) to make use of the wait_for_replay_catchup()
wrapper just added in a1acdacada.

Regards,

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