pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedLogical replication from standby
2+ messages / 2 participants
[nested] [flat]
* Logical replication from standby
@ 2024-03-01 09:28 =?iso-8859-2?Q?Domen_=A9etar?= <domen.setar@izum.si>
0 siblings, 0 replies; 2+ messages in thread
From: Domen Šetar @ 2024-03-01 09:28 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
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.setar@izum.si> domen.setar@izum.si
Attachments:
[image/jpeg] image001.jpg (1.3K, ../../203ab630a9da4fbe9b54b9e236f060b6@izum.si/3-image001.jpg)
download | view image
[application/pkcs7-signature] smime.p7s (6.6K, ../../203ab630a9da4fbe9b54b9e236f060b6@izum.si/4-smime.p7s)
download
^ permalink raw reply [nested|flat] 2+ messages in thread
* RE: Logical replication from standby
@ 2024-03-04 07:27 Domen Šetar <domen.setar@izum.si>
0 siblings, 0 replies; 2+ messages in thread
From: Domen Šetar @ 2024-03-04 07:27 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Hi admins,
It seams that my problem is not common. Actualy it is.
Because there is no postgresql traffic in my testnig envoronment, I have to run »SELECT * FROM pg_log_standby_snapshot();« on primary for each (!!!!) table in database I replicated. ☹
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.setar@izum.si> domen.setar@izum.si
From: Domen Šetar
Sent: Friday, March 1, 2024 10:28 AM
To: pgsql-admin@lists.postgresql.org
Subject: Logical replication from standby
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.setar@izum.si> domen.setar@izum.si
Attachments:
[image/jpeg] image002.jpg (1.3K, ../../9b954af1344d4e1a94fad17b95576624@izum.si/3-image002.jpg)
download | view image
[image/jpeg] image003.jpg (1.3K, ../../9b954af1344d4e1a94fad17b95576624@izum.si/4-image003.jpg)
download | view image
[application/pkcs7-signature] smime.p7s (6.6K, ../../9b954af1344d4e1a94fad17b95576624@izum.si/5-smime.p7s)
download
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-03-04 07:27 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-03-01 09:28 Logical replication from standby =?iso-8859-2?Q?Domen_=A9etar?= <domen.setar@izum.si>
2024-03-04 07:27 RE: Logical replication from standby Domen Šetar <domen.setar@izum.si>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox