Re: Logical Replication of sequences

Поиск
Список
Период
Сортировка
От Nisha Moond
Тема Re: Logical Replication of sequences
Дата
Msg-id CABdArM7wo7gP1nPHBp-DcROLPCiRJ5UFQFkgug_X9S7+eYYgrA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Logical Replication of sequences  (shveta malik <shveta.malik@gmail.com>)
Список pgsql-hackers
On Wed, Jun 25, 2025 at 9:26 AM shveta malik <shveta.malik@gmail.com> wrote:
>
> On Tue, Jun 24, 2025 at 6:44 PM Shlok Kyal <shlok.kyal.oss@gmail.com> wrote:
> >
> >
> > 1. Initially, I have created a publication on sequence s1.
> > postgres=# CREATE PUBLICATION pub1 FOR ALL SEQUENCES;
> > CREATE PUBLICATION
> > postgres=# ALTER PUBLICATION pub1 SET TABLE t1;
> > ALTER PUBLICATION
> > postgres=# \d s1
> >                              Sequence "public.s1"
> >   Type  | Start | Minimum |       Maximum       | Increment | Cycles? | Cache
> > --------+-------+---------+---------------------+-----------+---------+-------
> >  bigint |     1 |       1 | 9223372036854775807 |         1 | no      |     1
> > Publications:
> >     "pub1"
> > postgres=# select * from pg_publication_rel;
> >   oid  | prpubid | prrelid | prqual | prattrs
> > -------+---------+---------+--------+---------
> >  16415 |   16414 |   16388 |        |
> > (1 row)
> >
> > Here, we can set the publication to TABLE or TABLES FOR SCHEMA. Should
> > this be allowed?
> > If a publication is created on FOR ALL TABLES, such an operation is not allowed.
> >
>
> Good catch. IMO, this should not be allowed as currently we strictly
> support either ALL SEQUENCES or ALL SEQUENCES with ALL TABLES alone.
>

+1

A similar situation existed for the ALTER PUBLICATION ... ADD ...
command as reported in [1] (point #3).
This has been addressed in v20250630, where similar to ALL TABLES, ADD
or SET operations are now disallowed for ALL SEQUENCES publications.

[1] https://www.postgresql.org/message-id/CABdArM7h1qQLUb_S7i6MrLPEtHXnX%2BY2fPQaSnqhCdHktcQk5Q%40mail.gmail.com

--
Thanks,
Nisha



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