| From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
|---|---|
| To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
| Cc: | Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: DROP SUBSCRIPTION and ROLLBACK |
| Date: | 2017-02-08 00:01:47 |
| Message-ID: | CAB7nPqT96N-gytBA6V_uqoBN2fobg2obrb=eF93-D9QKt9+CmQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Feb 8, 2017 at 1:30 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Wed, Feb 8, 2017 at 12:26 AM, Petr Jelinek
> <petr(dot)jelinek(at)2ndquadrant(dot)com> wrote:
>> For example what happens if apply crashes during the DROP
>> SUBSCRIPTION/COMMIT and is not started because the delete from catalog
>> is now visible so the subscription is no longer there?
>
> Another idea is to treat DROP SUBSCRIPTION in the same way as VACUUM, i.e.,
> make it emit an error if it's executed within user's transaction block.
It seems to me that this is exactly Petr's point: using
PreventTransactionChain() to prevent things to happen.
> Also DROP SUBSCRIPTION should call CommitTransactionCommand() just
> after removing the entry from pg_subscription, then connect to the publisher
> and remove the replication slot.
For consistency that may be important.
--
Michael
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2017-02-08 00:16:14 | Re: possibility to specify template database for pg_regress |
| Previous Message | Robert Haas | 2017-02-07 23:57:51 | Re: Caching index AM working data across aminsert calls |