Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-04-06 Thread Japin Li
On Tue, 06 Apr 2021 at 17:56, Peter Eisentraut wrote: > On 06.04.21 07:24, Japin Li wrote: I think this patch is about ready to commit, but please provide a final version in good time. >>> I took the liberty to address all the review comments and provide a v9 >>> patch on top of Japin

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-04-06 Thread Peter Eisentraut
On 06.04.21 07:24, Japin Li wrote: I think this patch is about ready to commit, but please provide a final version in good time. I took the liberty to address all the review comments and provide a v9 patch on top of Japin's v8 patch-set. (Also, please combine your patches into a single patch.)

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-04-05 Thread Japin Li
On Sat, 03 Apr 2021 at 13:20, Bharath Rupireddy wrote: > On Sat, Apr 3, 2021 at 1:29 AM Peter Eisentraut > wrote: >> The code you have in merge_publications() to report all existing >> publications is pretty messy and is not properly internationalized. I >> think what you are trying to do the

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-04-02 Thread Bharath Rupireddy
On Sat, Apr 3, 2021 at 1:29 AM Peter Eisentraut wrote: > The code you have in merge_publications() to report all existing > publications is pretty messy and is not properly internationalized. I > think what you are trying to do there is excessive. Compare this > similar case: > > create table t1

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-04-02 Thread Peter Eisentraut
On 23.03.21 16:08, Japin Li wrote: I check the duplicates for newpublist in merge_publications(). The code is copied from publicationListToArray(). I do not check for all duplicates because it will make the code more complex. For example: ALTER SUBSCRIPTION mysub ADD PUBLICATION mypub2, mypub2,

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-04-01 Thread Bharath Rupireddy
On Tue, Mar 23, 2021 at 8:39 PM Japin Li wrote: > I check the duplicates for newpublist in merge_publications(). The code is > copied from publicationListToArray(). IMO, we can have the same code inside a function, probably named "check_duplicates_in_publist" or some other better name: static voi

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-03-23 Thread Japin Li
On Mon, 22 Mar 2021 at 11:14, Bharath Rupireddy wrote: > On Sun, Mar 7, 2021 at 7:21 PM Japin Li wrote: >> Thank you point out this. Fixed it in v7 patch set. >> >> Please consider the v7 patch for futher review. > > Thanks for the patches. I just found the following behaviour with the > new A

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-03-21 Thread Bharath Rupireddy
On Sun, Mar 7, 2021 at 7:21 PM Japin Li wrote: > Thank you point out this. Fixed it in v7 patch set. > > Please consider the v7 patch for futher review. Thanks for the patches. I just found the following behaviour with the new ADD/DROP syntax: when the specified publication list has duplicates,

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-03-07 Thread Japin Li
On Sun, 07 Mar 2021 at 19:43, Bharath Rupireddy wrote: > I'm reading through the v6 patches again, here are some comments. > Thanks for your review again. > 1) IMO, we can merge 0001 into 0002 > 2) A typo, it's "current" not "ccurrent" - + * Merge ccurrent > subscription's publications and use

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-03-07 Thread Bharath Rupireddy
On Thu, Feb 18, 2021 at 8:01 AM japin wrote: > On Tue, 16 Feb 2021 at 09:58, Bharath Rupireddy > wrote: > > On Mon, Feb 15, 2021 at 8:13 AM Bharath Rupireddy > > wrote: > >> > >> On Sat, Feb 13, 2021 at 11:41 AM japin wrote: > >> > > IIUC, with the current patch, the new ALTER SUBSCRIPTION ...

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-02-17 Thread japin
On Tue, 16 Feb 2021 at 09:58, Bharath Rupireddy wrote: > On Mon, Feb 15, 2021 at 8:13 AM Bharath Rupireddy > wrote: >> >> On Sat, Feb 13, 2021 at 11:41 AM japin wrote: >> > > IIUC, with the current patch, the new ALTER SUBSCRIPTION ... ADD/DROP >> > > errors out on the first publication that

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-02-15 Thread Bharath Rupireddy
On Mon, Feb 15, 2021 at 8:13 AM Bharath Rupireddy wrote: > > On Sat, Feb 13, 2021 at 11:41 AM japin wrote: > > > IIUC, with the current patch, the new ALTER SUBSCRIPTION ... ADD/DROP > > > errors out on the first publication that already exists/that doesn't > > > exist right? What if there are mu

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-02-14 Thread Bharath Rupireddy
On Sat, Feb 13, 2021 at 11:41 AM japin wrote: > > IIUC, with the current patch, the new ALTER SUBSCRIPTION ... ADD/DROP > > errors out on the first publication that already exists/that doesn't > > exist right? What if there are multiple publications given in the > > ADD/DROP list, and few of them

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-02-12 Thread japin
Thanks for your review again. On Wed, 10 Feb 2021 at 21:49, Bharath Rupireddy wrote: > On Fri, Feb 5, 2021 at 6:51 PM japin wrote: >> On Fri, 05 Feb 2021 at 17:50, Bharath Rupireddy >> wrote: >> We will get cell == NULL when we iterate all items in publist. I use it >> to check whether the

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-02-10 Thread Bharath Rupireddy
On Fri, Feb 5, 2021 at 6:51 PM japin wrote: > On Fri, 05 Feb 2021 at 17:50, Bharath Rupireddy > wrote: > We will get cell == NULL when we iterate all items in publist. I use it > to check whether the dropped publication is in publist or not. > > > If you > > have a strong reasong retain this er

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-02-05 Thread japin
On Fri, 05 Feb 2021 at 17:50, Bharath Rupireddy wrote: > On Wed, Feb 3, 2021 at 2:02 PM japin wrote: >> On Wed, 03 Feb 2021 at 13:15, Bharath Rupireddy >> wrote: >> > On Thu, Jan 28, 2021 at 10:07 AM japin wrote: >> >> Attaching v3 patches, please consider these for further review. >> > >> >

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-02-05 Thread Bharath Rupireddy
On Wed, Feb 3, 2021 at 2:02 PM japin wrote: > On Wed, 03 Feb 2021 at 13:15, Bharath Rupireddy > wrote: > > On Thu, Jan 28, 2021 at 10:07 AM japin wrote: > >> Attaching v3 patches, please consider these for further review. > > > > I think we can add a commitfest entry for this feature, so that t

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-02-03 Thread japin
On Wed, 03 Feb 2021 at 13:15, Bharath Rupireddy wrote: > On Thu, Jan 28, 2021 at 10:07 AM japin wrote: >> Attaching v3 patches, please consider these for further review. > > I think we can add a commitfest entry for this feature, so that the > patches will be tested on cfbot. Ignore if done al

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-02-02 Thread Bharath Rupireddy
On Thu, Jan 28, 2021 at 10:07 AM japin wrote: > Attaching v3 patches, please consider these for further review. I think we can add a commitfest entry for this feature, so that the patches will be tested on cfbot. Ignore if done already. With Regards, Bharath Rupireddy. EnterpriseDB: http://www.e

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-01-27 Thread japin
On Thu, 28 Jan 2021 at 12:22, Bharath Rupireddy wrote: > On Wed, Jan 27, 2021 at 7:35 PM Li Japin wrote: >> > I don't see any problem if ALTER SUBSCRIPTION ... ADD PUBLICATION with >> > refresh true refreshes only the newly added publications, because what >> > we do in AlterSubscription_refres

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-01-27 Thread Bharath Rupireddy
On Wed, Jan 27, 2021 at 7:35 PM Li Japin wrote: > > I don't see any problem if ALTER SUBSCRIPTION ... ADD PUBLICATION with > > refresh true refreshes only the newly added publications, because what > > we do in AlterSubscription_refresh() is that we fetch the tables > > associated with the publica

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-01-27 Thread Li Japin
> On Jan 27, 2021, at 19:41, Bharath Rupireddy > wrote: > > On Wed, Jan 27, 2021 at 4:42 PM Amit Kapila wrote: >>> On Wed, Jan 27, 2021 at 3:16 PM Bharath Rupireddy >>> wrote: On Wed, Jan 27, 2021 at 3:01 PM Amit Kapila wrote: >>> So, I think the new syntax, ALTER SUBSCRIPTION .

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-01-27 Thread Li Japin
> On Jan 27, 2021, at 19:41, Bharath Rupireddy > wrote: > > On Wed, Jan 27, 2021 at 4:42 PM Amit Kapila wrote: >>> On Wed, Jan 27, 2021 at 3:16 PM Bharath Rupireddy >>> wrote: On Wed, Jan 27, 2021 at 3:01 PM Amit Kapila wrote: >>> So, I think the new syntax, ALTER SUBSCRIPTION .

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-01-27 Thread Bharath Rupireddy
On Wed, Jan 27, 2021 at 4:42 PM Amit Kapila wrote: > > On Wed, Jan 27, 2021 at 3:16 PM Bharath Rupireddy > wrote: > > > > On Wed, Jan 27, 2021 at 3:01 PM Amit Kapila wrote: > > > > So, I think the new syntax, ALTER SUBSCRIPTION .. ADD/DROP PUBLICATION > > will refresh the new and existing public

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-01-27 Thread Amit Kapila
On Wed, Jan 27, 2021 at 3:16 PM Bharath Rupireddy wrote: > > On Wed, Jan 27, 2021 at 3:01 PM Amit Kapila wrote: > > So, I think the new syntax, ALTER SUBSCRIPTION .. ADD/DROP PUBLICATION > will refresh the new and existing publications. > That sounds a bit unusual to me because when the user has

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-01-27 Thread Dilip Kumar
On Wed, Jan 27, 2021 at 3:26 PM japin wrote: > > > On Wed, 27 Jan 2021 at 16:59, Amit Kapila wrote: > > On Tue, Jan 26, 2021 at 9:18 AM japin wrote: > >> > >> > >> When I read the discussion in [1], I found that update subscription's > >> publications > >> is complicated. > >> > >> For example,

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-01-27 Thread japin
On Wed, 27 Jan 2021 at 16:59, Amit Kapila wrote: > On Tue, Jan 26, 2021 at 9:18 AM japin wrote: >> >> >> When I read the discussion in [1], I found that update subscription's >> publications >> is complicated. >> >> For example, I have 5 publications in subscription. >> >> CREATE SUBSCRIPT

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-01-27 Thread japin
On Wed, 27 Jan 2021 at 17:46, Bharath Rupireddy wrote: > On Wed, Jan 27, 2021 at 3:01 PM Amit Kapila wrote: >> > > While the new proposed syntax does seem to provide some ease for users >> > > but it has nothing which we can't do with current syntax. Also, in the >> > > current syntax, there i

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-01-27 Thread Bharath Rupireddy
On Wed, Jan 27, 2021 at 3:01 PM Amit Kapila wrote: > > > While the new proposed syntax does seem to provide some ease for users > > > but it has nothing which we can't do with current syntax. Also, in the > > > current syntax, there is an additional provision for refreshing the > > > existing publ

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-01-27 Thread Amit Kapila
On Wed, Jan 27, 2021 at 2:57 PM Bharath Rupireddy wrote: > > On Wed, Jan 27, 2021 at 2:30 PM Amit Kapila wrote: > > > > On Tue, Jan 26, 2021 at 9:18 AM japin wrote: > > > > > > > > > When I read the discussion in [1], I found that update subscription's > > > publications > > > is complicated. >

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-01-27 Thread Bharath Rupireddy
On Wed, Jan 27, 2021 at 2:30 PM Amit Kapila wrote: > > On Tue, Jan 26, 2021 at 9:18 AM japin wrote: > > > > > > When I read the discussion in [1], I found that update subscription's > > publications > > is complicated. > > > > For example, I have 5 publications in subscription. > > > > CREAT

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-01-27 Thread Amit Kapila
On Tue, Jan 26, 2021 at 9:18 AM japin wrote: > > > When I read the discussion in [1], I found that update subscription's > publications > is complicated. > > For example, I have 5 publications in subscription. > > CREATE SUBSCRIPTION mysub1 CONNECTION 'host=localhost port=5432 > dbname=postg

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-01-27 Thread Dilip Kumar
On Tue, Jan 26, 2021 at 9:18 AM japin wrote: > > > Hi, hackers > > When I read the discussion in [1], I found that update subscription's > publications > is complicated. > > For example, I have 5 publications in subscription. > > CREATE SUBSCRIPTION mysub1 CONNECTION 'host=localhost port=5432

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-01-26 Thread japin
On Tue, 26 Jan 2021 at 13:46, japin wrote: > Hi, Bharath > > Thanks for your reviewing. > > On Tue, 26 Jan 2021 at 12:55, Bharath Rupireddy > wrote: >> On Tue, Jan 26, 2021 at 9:25 AM japin wrote: >>> > I think it's more convenient. Any thoughts? >>> >>> Sorry, I forgot to attach the patch. >>

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-01-25 Thread japin
Hi, Bharath Thanks for your reviewing. On Tue, 26 Jan 2021 at 12:55, Bharath Rupireddy wrote: > On Tue, Jan 26, 2021 at 9:25 AM japin wrote: >> > I think it's more convenient. Any thoughts? >> >> Sorry, I forgot to attach the patch. > > As I mentioned earlier in [1], +1 from my end to have t

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-01-25 Thread Bharath Rupireddy
On Tue, Jan 26, 2021 at 9:25 AM japin wrote: > > I think it's more convenient. Any thoughts? > > Sorry, I forgot to attach the patch. As I mentioned earlier in [1], +1 from my end to have the new syntax for adding/dropping publications from subscriptions i.e. ALTER SUBSCRIPTION ... ADD/DROP PUBLI

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-01-25 Thread japin
On Tue, 26 Jan 2021 at 11:47, japin wrote: > Hi, hackers > > When I read the discussion in [1], I found that update subscription's > publications > is complicated. > > For example, I have 5 publications in subscription. > > CREATE SUBSCRIPTION mysub1 CONNECTION 'host=localhost port=5432 > d

Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-01-25 Thread japin
Hi, hackers When I read the discussion in [1], I found that update subscription's publications is complicated. For example, I have 5 publications in subscription. CREATE SUBSCRIPTION mysub1 CONNECTION 'host=localhost port=5432 dbname=postgres' PUBLICATION mypub1, mypub2, mypub3, mypu