Re: create subscription with (origin = none, copy_data = on)

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: create subscription with (origin = none, copy_data = on)
Дата
Msg-id CAA4eK1LO-nRNeYp4y-=5nLG0HHFnrCZaychbyvUaV43=cWOsbQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: create subscription with (origin = none, copy_data = on)  (vignesh C <vignesh21@gmail.com>)
Список pgsql-hackers
On Sat, Jan 18, 2025 at 10:31 AM vignesh C <vignesh21@gmail.com> wrote:
>
> Attached patch has the fix for this issue which includes the partition
> tables also for the publication now and throws a warning
> appropriately.
>

The corresponding query (see "To find which tables might potentially
include non-local origins .." on [1]) on the create_subscription doc
page.

*
@@ -1147,10 +1151,12 @@ pg_get_publication_tables(PG_FUNCTION_ARGS)
     *schemarelids;

  relids = GetPublicationRelations(pub_elem->oid,
+ allparttables ? PUBLICATION_PART_ALL :
  pub_elem->pubviaroot ?
  PUBLICATION_PART_ROOT :
  PUBLICATION_PART_LEAF);
  schemarelids = GetAllSchemaPublicationRelations(pub_elem->oid,
+ allparttables ? PUBLICATION_PART_ALL :
  pub_elem->pubviaroot ?
  PUBLICATION_PART_ROOT :
  PUBLICATION_PART_LEAF);

Don't we need to add similar handling FOR ALL TABLES case? If not, why?

BTW, the proposed fix is not backpatcheable as it changes the catalog
which requires catversion bump. However, as this is a WARNING case, if
we can't find a fix that can't be backpatched, we can fix it in
HEAD-only.

[1] - https://www.postgresql.org/docs/devel/sql-createsubscription.html#SQL-CREATESUBSCRIPTION-NOTES

--
With Regards,
Amit Kapila.



В списке pgsql-hackers по дате отправления: