Logical replication from standby

From: Domen Šetar <domen(dot)setar(at)izum(dot)si>
To: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Logical replication from standby
Date: 2024-03-01 09:28:09
Message-ID: 203ab630a9da4fbe9b54b9e236f060b6@izum.si
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi admins,

I'm just in testing phase of logical replication from standby server on
postgresql 16.

I have some expirience in logical replication on postgresql 14. Common
behaviour was that after starting logical replication of all tables in
database I have some additional pg_*_sync_* replication slots. After all
tables were synchronized all *sync* replications slots disapeared and only
replication slot that I created stays in place.

On logical replication from standby I see folowing state on my standby
server:

postgres=# SELECT * FROM pg_catalog.pg_replication_slots;

slot_name | plugin | slot_type | datoid |
database | temporary | active | active_pid | xmin | catalog_xmin |
restart_lsn | confirmed_flush_lsn | wal_status | safe_wal_

size | two_phase | conflicting

-------------------------------------------+----------+-----------+--------+
----------+-----------+--------+------------+------+--------------+---------
-----+---------------------+------------+----------

-----+-----------+-------------

pg_204804_sync_202370_7340192741191578195 | pgoutput | logical | 168324 |
c3_test | f | t | 2105026 | | 2006589 |
C6E/50000B18 | | reserved |

| f | f

pg_204804_sync_201130_7340192741191578195 | pgoutput | logical | 168324 |
c3_test | f | t | 2105025 | | 2006589 |
C6E/50000B18 | | reserved |

| f | f

c3_test_subscription | pgoutput | logical | 168324 |
c3_test | f | t | 2103843 | | 2006589 |
C6E/50000AE0 | C6E/50000B18 | reserved |

| f | f

(3 rows)

I'm replicating small database of 25MB with less thant 140 tables.

As I can see database is sucessfully replicated but both *sync* replication
slots stay in place.

Is this new behaviour for logical replication from standby, or did I miss
something?

Best regards!

Domen Šetar
Computer Systems Support
IZUM - Institute of Information Science | Prešernova ulica 17 | 2000 Maribor
| Slovenia
T: +386 2 25 20 339 | M: +386 41 676 342 | <http://www.izum.si/>
www.izum.si | <mailto:domen(dot)setar(at)izum(dot)si> domen(dot)setar(at)izum(dot)si

Browse pgsql-admin by date

  From Date Subject
Next Message Harish Harish 2024-03-01 16:37:03 Missing indexes
Previous Message Tom Lane 2024-02-29 18:35:25 Re: Adding custom constraints on a postgres database