Re: [BUG] wrong refresh when ALTER SUBSCRIPTION ADD/DROP PUBLICATION - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: [BUG] wrong refresh when ALTER SUBSCRIPTION ADD/DROP PUBLICATION
Date
Msg-id CAD21AoCpRFOmhrgBLMgTqqLtWnEdmLJH+5Hjm_xE+CqPMn63xQ@mail.gmail.com
Whole thread Raw
In response to Re: [BUG] wrong refresh when ALTER SUBSCRIPTION ADD/DROP PUBLICATION  (Amit Kapila <amit.kapila16@gmail.com>)
Responses RE: [BUG] wrong refresh when ALTER SUBSCRIPTION ADD/DROP PUBLICATION
List pgsql-hackers
On Mon, Aug 23, 2021 at 1:59 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Sat, Aug 7, 2021 at 6:53 PM houzj.fnst@fujitsu.com
> <houzj.fnst@fujitsu.com> wrote:
> >
> > Personally, I also think it will be better to make the behavior consistent.
> > Attach the new version patch make both ADD and DROP behave the same as SET PUBLICATION
> > which refresh all the publications.
> >
>
> I think we can have tests in the separate test file (alter_sub_pub.pl)
> like you earlier had in one of the versions. Use some meaningful names
> for tables instead of temp1, temp2 as you had in the previous version.
> Otherwise, the code changes look good to me.

-               supported_opts = SUBOPT_REFRESH;
-               if (isadd)
-                   supported_opts |= SUBOPT_COPY_DATA;
+               supported_opts = SUBOPT_REFRESH | SUBOPT_COPY_DATA;

I think that the currently the doc says copy_data option can be
specified except in DROP PUBLICATION case, which needs to be fixed
corresponding the above change.

Regards,

-- 
Masahiko Sawada
EDB:  https://www.enterprisedb.com/



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: proposal: enhancing plpgsql debug API - returns text value of variable content
Next
From: Amit Kapila
Date:
Subject: Separate out FileSet from SharedFileSet (was Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o)