Starting logical replication at arbitrary point that's available in WAL

From: Alexander Uvizhev <uvizhe(at)posteo(dot)net>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Starting logical replication at arbitrary point that's available in WAL
Date: 2024-12-27 11:39:02
Message-ID: facf084c-83e8-46be-bdeb-2c94cb16d66e@posteo.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I'm doing a logical replication using streaming replication protocol and
I'm trying to start a stream from a certain arbitrary point that's
available in WAL. However, both CREATE_REPLICATION_SLOT and
pg_create_logical_replication_slot() create slot with nearly last LSN/XID.

Is it possible to create a replication slot with arbitrary LSN/XID values?

Also pg_create_logical_replication_slot() for some reason gives
different result than CREATE_REPLICATION_SLOT: new slot's `catalog_xmin`
is set to the smallest `catalog_xmin` among already existing slots.
Looks like a bug.

I'm using PostgreSQL 16.6.

--
AU
||

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Zhijie Hou (Fujitsu) 2024-12-27 12:20:05 RE: Starting logical replication at arbitrary point that's available in WAL
Previous Message Tom Lane 2024-12-27 00:32:11 Re: Using Expanded Objects other than Arrays from plpgsql