On Wed, Feb 3, 2021 at 12:24 AM Amit Kapila <amit.kapil...@gmail.com> wrote:
> The problem here is that we are allowing to drop the table when table > synchronization is still in progress and then we don't have any way to > know the corresponding slot or origin. I think we can try to drop the > slot and origin as well but that is not a good idea because slots once > dropped won't be rolled back. So, I have added a fix to disallow the > drop of the table when table synchronization is still in progress. > Apart from that, I have fixed comments raised by Peter as discussed > above and made some additional changes in comments, code (code changes > are cosmetic), and docs. > > Let me know if the issue reported is fixed or not? Yes, the issue is fixed, now the table drop results in an error. postgres=# drop table tab_rep ; ERROR: could not drop relation mapping for subscription "tap_sub" DETAIL: Table synchronization for relation "tab_rep" is in progress and is in state "f". HINT: Use ALTER SUBSCRIPTION ... ENABLE to enable subscription if not already enabled or use DROP SUBSCRIPTION ... to drop the subscription. regards, Ajin Cherian Fujitsu Australia