Re: Restrict publishing of partitioned table with a foreign table as partition

From: Sergey Tatarintsev <s(dot)tatarintsev(at)postgrespro(dot)ru>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Restrict publishing of partitioned table with a foreign table as partition
Date: 2025-01-29 13:50:49
Message-ID: 12e49de4-8914-4602-bd1c-749cf2e56ad6@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


29.01.2025 12:16, Shlok Kyal пишет:
> Hi,
>
> As part of a discussion in [1], I am starting this thread to address
> the issue reported for foreign tables.
>
> Logical replication of foreign tables is not supported, and we throw
> an error in this case. But when we create a publication on a
> partitioned table that has a foreign table as a partition, the initial
> sync of such a table is successful. We should also throw an error in
> such cases.
> With this patch, we will throw an error when we try to create a
> publication on (or add to an existing publication) a partitioned table
> with a foreign table as its partition or attach such a table to
> existing published tables.
>
> [1] : https://www.postgresql.org/message-id/CAA4eK1Lhh4SgiYQLNiWSNKGdVSzbd53%3Dsr2tQCKooEphDkUtgw%40mail.gmail.com
>
> Thanks and Regards,
> Shlok Kyal
Hi!

Thanks for patch.

I reviewed it and made some changes.

1. we should check foreign tables (not partitioned)
2. added checking for foreign table creation
3. some little corrections

See attach

Attachment Content-Type Size
v2-0001-Restrict-publishing-of-partitioned-table-with-a-f.patch text/x-patch 13.6 KB
v2-0002-Restrict-publishing-of-foreign-tables-and-partitione.patch text/x-patch 8.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Maxim Orlov 2025-01-29 14:04:28 Re: POC: make mxidoff 64 bits
Previous Message Bertrand Drouvot 2025-01-29 13:32:37 Re: per backend WAL statistics