From: | japin <japinli(at)hotmail(dot)com> |
---|---|
To: | japin <japinli(at)hotmail(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax |
Date: | 2021-01-26 03:55:19 |
Message-ID: | MEYP282MB166925E581C85E296B5091C6B6BC0@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 26 Jan 2021 at 11:47, japin <japinli(at)hotmail(dot)com> 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 dbname=postgres'
> PUBLICATION mypub1, mypub2, mypub3, mypub4, mypub5;
>
> If I want to drop "mypub4", we should use the following command:
>
> ALTER SUBSCRIPTION mysub1 SET PUBLICATION mypub1, mypub2, mypub3, mypub5;
>
> Also, if I want to add "mypub7" and "mypub8", it will use:
>
> ALTER SUBSCRIPTION mysub1 SET PUBLICATION mypub1, mypub2, mypub3, mypub5, mypub7, mypub8;
>
> Attached implement ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax, for the above
> two cases, we can use the following:
>
> ALTER SUBSCRIPTION mysub1 DROP PUBLICATION mypub4;
>
> ALTER SUBSCRIPTION mysub1 DROP PUBLICATION mypub7, mypub8;
>
> I think it's more convenient. Any thoughts?
>
> [1] - https://www.postgresql.org/message-id/MEYP282MB16690CD5EC5319FC35B2F78AB6BD0%40MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Sorry, I forgot to attach the patch.
--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.
Attachment | Content-Type | Size |
---|---|---|
v1-0001-Add-ALTER-SUBSCRIPTION.ADD-DROP-PUBLICATION.patch | text/x-patch | 11.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | japin | 2021-01-26 04:05:45 | Re: Identify missing publications from publisher while create/alter subscription. |
Previous Message | japin | 2021-01-26 03:47:52 | Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax |