From: | vignesh C <vignesh21(at)gmail(dot)com> |
---|---|
To: | "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com> |
Cc: | Greg Nancarrow <gregn4422(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 12:17:51 |
Message-ID: | CALDaNm1iYkOg0=63NCfK162N+z5BGxeWuifMYQbvUnq1M_SHAQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jul 23, 2021 at 6:26 AM tanghy(dot)fnst(at)fujitsu(dot)com
<tanghy(dot)fnst(at)fujitsu(dot)com> wrote:
>
> On Thursday, July 22, 2021 1:30 AM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> >
> > Thanks for reporting this issue, this issue is fixed in the attached v13 patch.
> > I have changed relation name pg_publication_schema to
> > pg_publication_sch so that the names are in similar lines with
> > pg_publication_rel relation and similar changes were done for variable
> > names too.
>
> Thanks for your fixing. The issue is fixed as you said.
>
> 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.
>
> I think the error message is pretty hard to understand. Maybe we can do sth to improve this scenario.
>
> Here is two proposal:
> 1. Don't report error message, just add some code to make the above command to be executed successfully,
> just like "ALTER PUBLICATION ... SET TABLE ..." as follolws:
>
> postgres=# ALTER PUBLICATION pub2 SET TABLE t1,t1;
> ALTER PUBLICATION
> postgres=# \dRp+ pub2
> Publication pub2
> Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root | Pubtype
> ----------+------------+---------+---------+---------+-----------+----------+---------
> postgres | f | t | t | t | t | f | t
> Tables:
> "public.t1"
>
> 2. Report a easily understandable message like: Schema s1 specified more than once
>
I have changed it to not report any error, this issue is fixed in the
v14 patch attached at [1].
[1] - https://www.postgresql.org/message-id/CALDaNm3DTj535ezfmm8QHLOtOkcHF2ZcCfSjfR%3DVbTbLZXFRsA%40mail.gmail.com
Regards,
Vignesh
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2021-07-23 12:45:49 | Re: Next Steps with Hash Indexes |
Previous Message | vignesh C | 2021-07-23 12:16:30 | Re: Added schema level support for publication. |