RE: BUG #18644: ALTER PUBLICATION ... SET (publish_via_partition_root) wrong/undocumented behavior.

Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>

From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: "maxim.boguk@gmail.com" <maxim.boguk@gmail.com>
Cc: "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2024-10-04T04:30:13Z
Lists: pgsql-bugs

Attachments

Dear Maxim,

Thanks for reporting the issue. Before discussing more about it, I want to confirm
the exact workload you did. Is below sequence same as you expected?

0. There is a table which have leaf tables on publisher/subscriber.
1. create a PUBLICATION and include a root table
2. create a SUBSCRIPTION to subscribe above
3. insert some data on pub and wait until the replication is done.
4. do ALTER PUBLICAITON WITH (publish_via_partition_root = true)
5. insert tuples on the publisher
-> tuples won't be replicated until ALTER SUBSCRIPTION REFRESH PUBLICATION is done.

If the copy_data is true for REFRESH, all tuples inserted at 3. will be copied again.
Otherwise, data between ALTER PUB. - ALTER SUB. will be lost.

Attached .pl file (renamed to .txt due to the security reason) can reproduce and
test the situation via our test framework.

Best regards,
Hayato Kuroda
FUJITSU LIMITED

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Doc: Add a caution in alter publication.