Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction - Mailing list pgsql-hackers

From Arseny Sher
Subject Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction
Date
Msg-id 87bmmfuddp.fsf@ars-thinkpad
Whole thread Raw
In response to Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction  (Masahiko Sawada <sawada.mshk@gmail.com>)
Responses Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction
List pgsql-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

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b
Next
From: Elvis Pranskevichus
Date:
Subject: Re: [HACKERS] [PATCH v1] Add and report the new "in_hot_standby" GUC pseudo-variable.