alter subscription drop publication fixes

From: vignesh C <vignesh21(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: alter subscription drop publication fixes
Date: 2021-05-12 16:25:21
Message-ID: CALDaNm21RwsDzs4xj14ApteAF7auyyomHNnp+NEL-sH8m-jMvQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

While I was reviewing one of the logical decoding features, I found a
few issues in alter subscription drop publication.

Alter subscription drop publication does not support copy_data option,
that needs to be removed from tab completion.

Dropping all the publications present in the subscription using alter
subscription drop publication would throw "subscription must contain
at least one publication". This message was slightly confusing to me.
As even though some publication was present on the subscription I was
not able to drop. Instead I feel we could throw an error message
something like "dropping specified publication will result in
subscription without any publication, this is not supported".

merge_publications can be called after validation of the options
specified, I think we should check if the options specified are
correct or not before checking the actual publications.

Attached a patch which contains the fixes for the same.
Thoughts?

Regards,
Vignesh

Attachment Content-Type Size
v1-0001-Fixes-in-alter-subscription-drop-publication.patch text/x-patch 3.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhihong Yu 2021-05-12 16:44:28 Re: Transactions involving multiple postgres foreign servers, take 2
Previous Message Laurenz Albe 2021-05-12 16:08:07 Re: RFC: Logging plan of the running query