From: | Nisha Moond <nisha(dot)moond412(at)gmail(dot)com> |
---|---|
To: | shveta malik <shveta(dot)malik(at)gmail(dot)com> |
Cc: | Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Euler Taveira <euler(at)eulerto(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org> |
Subject: | Re: Logical Replication of sequences |
Date: | 2025-06-30 09:51:48 |
Message-ID: | CABdArM7wo7gP1nPHBp-DcROLPCiRJ5UFQFkgug_X9S7+eYYgrA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jun 25, 2025 at 9:26 AM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
>
> On Tue, Jun 24, 2025 at 6:44 PM Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)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.
--
Thanks,
Nisha
From | Date | Subject | |
---|---|---|---|
Next Message | Nisha Moond | 2025-06-30 09:53:50 | Re: Logical Replication of sequences |
Previous Message | Nisha Moond | 2025-06-30 09:50:57 | Re: Logical Replication of sequences |