From: Arseny Sher <a.sher@postgrespro.ru>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: DROP SUBSCRIPTION hangs if sub is disabled in the same transaction
Date: Tue, 12 Sep 2017 18:48:18 +0300
Message-ID: <87bmmfuddp.fsf@ars-thinkpad> (raw)
In-Reply-To: <CAD21AoBACUhhSNVO+oxueJ9CKbKrfgqqRgMvfgntMjjsf+VkUg@mail.gmail.com>
References: <87mv6av84w.fsf@ars-thinkpad>
<87ingyv81u.fsf@ars-thinkpad>
<CAD21AoBuCHNP82MU+qC3SEBaiia46zb3EPn09-rTLdHVwN35XA@mail.gmail.com>
<CAD21AoBACUhhSNVO+oxueJ9CKbKrfgqqRgMvfgntMjjsf+VkUg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Masahiko Sawada <sawada.mshk@gmail.com> writes:
> FWIW, perhaps we can change the replication origin management so that
> DROP SUBSCRIPTION doesn't drop the replication origin and the apply
> worker itself removes it when exit. When an apply worker exits it
> removes the replication origin if the corresponding subscription had
> been removed.
I don't think this is reliable -- what if worker suddenly dies without
accomplishing the job? It is enough to kill the worker during execution
of (possibly long) transaction with DROP SUBSCRIPTION to meet such
situation. Dropping replication origin in one transaction with DROP
SUBSCRIPTION seems natural to me.
--
Arseny Sher
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: a.sher@postgrespro.ru, sawada.mshk@gmail.com
Subject: Re: DROP SUBSCRIPTION hangs if sub is disabled in the same transaction
In-Reply-To: <87bmmfuddp.fsf@ars-thinkpad>
References: <87mv6av84w.fsf@ars-thinkpad> <87ingyv81u.fsf@ars-thinkpad> <CAD21AoBuCHNP82MU+qC3SEBaiia46zb3EPn09-rTLdHVwN35XA@mail.gmail.com> <CAD21AoBACUhhSNVO+oxueJ9CKbKrfgqqRgMvfgntMjjsf+VkUg@mail.gmail.com> <87bmmfuddp.fsf@ars-thinkpad>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox