alter subscription drop publication fixes - Mailing list pgsql-hackers

From vignesh C
Subject alter subscription drop publication fixes
Date
Msg-id CALDaNm21RwsDzs4xj14ApteAF7auyyomHNnp+NEL-sH8m-jMvQ@mail.gmail.com
Whole thread Raw
Responses Re: alter subscription drop publication fixes
List 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

pgsql-hackers by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: RFC: Logging plan of the running query
Next
From: Zhihong Yu
Date:
Subject: Re: Transactions involving multiple postgres foreign servers, take 2