Re: Added schema level support for publication.

From: Greg Nancarrow <gregn4422(at)gmail(dot)com>
To: "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, Rahila Syed <rahilasyed90(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Subject: Re: Added schema level support for publication.
Date: 2021-07-23 01:44:33
Message-ID: CAJcOf-eVtyq2QrnPZEYP5fsi8_sv4GHdCAqENDjNDwxXw8AtwQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 23, 2021 at 10:56 AM tanghy(dot)fnst(at)fujitsu(dot)com
<tanghy(dot)fnst(at)fujitsu(dot)com> wrote:
>
>
> After applying your V13 patch. I noticed that if I specify duplicate schema names when using "ALTER PUBLICATION ... SET SCHEMA ...", I would get the following error message:
>
> postgres=# ALTER PUBLICATION pub1 SET SCHEMA s1,s1;
> ERROR: duplicate key value violates unique constraint "pg_publication_sch_psnspcid_pspubid_index"
> DETAIL: Key (psnspcid, pspubid)=(16406, 16405) already exists.
>

That definitely seems to be a bug, since "ALTER PUBLICATION ... SET
TABLE ..." ignores duplicates and there is no ERROR.
"CREATE PUBLICATION ... SET SCHEMA s1, s1;" and "ALTER PUBLICATION ...
ADD SCHEMA s1, s1;" also give the same kind of error.

Regards,
Greg Nancarrow
Fujitsu Australia

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2021-07-23 02:59:04 Re: row filtering for logical replication
Previous Message Justin Pryzby 2021-07-23 01:31:18 Re: Slightly improve initdb --sync-only option's help message