[HACKERS] Refreshing subscription relation state inside a transaction block - Mailing list pgsql-hackers

From Masahiko Sawada
Subject [HACKERS] Refreshing subscription relation state inside a transaction block
Date
Msg-id CAD21AoBD4T2RwTiWD8YfXd+q+m9swX50YjqT5ibj2MzEBVnBhw@mail.gmail.com
Whole thread Raw
Responses Re: [HACKERS] Refreshing subscription relation state inside atransaction block  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
List pgsql-hackers
Hi,

The commit ddd7b22b225ae41d16ceb218b387645cb9becfdc makes table sync
workers stop when subscription relation entry is removed. It doesn't
work fine inside transaction block. I think we should disallow to use
the following subscription DDLs inside a transaction block. Attached
patch.

* ALTER SUBSCRIPTION SET PUBLICATION WITH (refresh = true)
* ALTER SUBSCRIPTION REFRESH PUBLICATION

Also, even if we rollback ALTER SUBSCRIPTION REFRESH PUBLICATION, the
error message "NOTICE:  removed subscription for table public.t1"
appears. It's not a bug but might confuse the user.

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: [HACKERS] PG10 Partitioned tables and relation_is_updatable()
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] logical replication busy-waiting on a lock