Re: [HACKERS] DROP SUBSCRIPTION and ROLLBACK
От | Michael Paquier |
---|---|
Тема | Re: [HACKERS] DROP SUBSCRIPTION and ROLLBACK |
Дата | |
Msg-id | CAB7nPqT96N-gytBA6V_uqoBN2fobg2obrb=eF93-D9QKt9+CmQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] DROP SUBSCRIPTION and ROLLBACK (Fujii Masao <masao.fujii@gmail.com>) |
Ответы |
Re: [HACKERS] DROP SUBSCRIPTION and ROLLBACK
|
Список | pgsql-hackers |
On Wed, Feb 8, 2017 at 1:30 AM, Fujii Masao <masao.fujii@gmail.com> wrote: > On Wed, Feb 8, 2017 at 12:26 AM, Petr Jelinek > <petr.jelinek@2ndquadrant.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
В списке pgsql-hackers по дате отправления: