29.2. Subscription

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: jes(dot)challand(at)gmail(dot)com
Subject: 29.2. Subscription
Date: 2025-04-30 14:24:11
Message-ID: 174602305180.667.15199884480909063500@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/17/logical-replication-subscription.html
Description:

Hi,
https://www.postgresql.org/docs/17/logical-replication-subscription.html#LOGICAL-REPLICATION-SUBSCRIPTION-EXAMPLES
Firstly - a big thank you!
As an Oracle DBA, new to PostgreSQL, and therefore learning all the time,
every time I have reason to consult the PostgreSQL documentation, I'm hugely
impressed with the amount, quality, clarity, and accessibility of the
documentation provided. As a documentaion anorak myself, it brings a big
smile to my face so, as I said, thank you!
Today, I happened to be re-doing, and expanding on, labs on logical
replication, covered on a recently-completed course. I browsed through the
online documentation, (smiled), and started following the examples provided
in "29.2.2. Examples: Set Up Logical Replication."
Having created tables on publisher and subscriber, inserted data on the
publisher, and created publication and subscription, I found my results to
be the exact opposite of those indicated here - "Observe that initial table
data is copied, regardless of the publish operation of the publication.".
My subscriber tables t2 and t3 were emply (as though the (publish =
'truncate') rule had in fact been applied to the initial data).
As a result, having inserted the second set of data, my tables now look like
this:
=================
= Publisher
=================
postgres=# INSERT INTO t1 VALUES (4, 'four'), (5, 'five'), (6, 'six');
INSERT 0 3
postgres=# INSERT INTO t2 VALUES (4, 'D'), (5, 'E'), (6, 'F');
INSERT 0 3
postgres=# INSERT INTO t3 VALUES (4, 'iv'), (5, 'v'), (6, 'vi');
INSERT 0 3
postgres=# SELECT * FROM t1;
a | b
---+-------
1 | one
2 | two
3 | three
4 | four
5 | five
6 | six
(6 rows)
postgres=# SELECT * FROM t2;
c | d
---+---
1 | A
2 | B
3 | C
4 | D
5 | E
6 | F
(6 rows)
postgres=# SELECT * FROM t3;
e | f
---+-----
1 | i
2 | ii
3 | iii
4 | iv
5 | v
6 | vi
(6 rows)
=================
= Subscriber
=================
postgres=# SELECT * FROM t1;
a | b
---+-------
1 | one
2 | two
3 | three
4 | four
5 | five
6 | six
(6 rows)
postgres=# SELECT * FROM t2;
c | d
---+---
(0 rows)
postgres=# SELECT * FROM t3;
e | f
---+---
(0 rows)
Have I misunderstood something, perhaps inadvertantly mis-configured some
obscure parameter, or (please no!) is the documentation incorrect?
Thanks in advance for any guidance you're able to offer.
Regards,
Jes

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message David G. Johnston 2025-04-30 20:51:22 Re: 29.2. Subscription
Previous Message Nathan Long 2025-04-29 23:12:47 Re: `inet` docs suggestion and possible bug report