Re: Logical Replication of sequences

From: shveta malik <shveta(dot)malik(at)gmail(dot)com>
To: Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(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>, shveta malik <shveta(dot)malik(at)gmail(dot)com>
Subject: Re: Logical Replication of sequences
Date: 2025-06-25 03:56:08
Message-ID: CAJpy0uCgADMz6BN7WdOcALtUN+8rwdAfoRFJeh0wrvkOdxOXrQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

thanks
Shveta

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2025-06-25 04:18:49 Re: queryId constant squashing does not support prepared statements
Previous Message Nisha Moond 2025-06-25 03:56:05 Re: Logical Replication of sequences