[HACKERS] pg_subscription_rel entry can be updated concurrently - Mailing list pgsql-hackers

From Masahiko Sawada
Subject [HACKERS] pg_subscription_rel entry can be updated concurrently
Date
Msg-id CAD21AoCjP+5mwt+6kHaOJ4q1ufzGDu1OsmomSjaL3eE7W5S8Tw@mail.gmail.com
Whole thread Raw
Responses Re: [HACKERS] pg_subscription_rel entry can be updated concurrently  (Michael Paquier <michael.paquier@gmail.com>)
Re: [HACKERS] pg_subscription_rel entry can be updated concurrently  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
List pgsql-hackers
Hi,

I often get an error "ERROR:  tuple concurrently updated" when
changing subscription state(ALTER SUBSCRIPTION or DROP SUBSCRIPTION).
The cause of this error is that table sync worker and apply worker can
try to update the same tuple in pg_subscription_rel. Especially it
often happens when we do initial copy for many tables and change it
during executing.

I think that touching the same tuple by two worker processes happens
when aborting replication for a table or a subscription, so it would
be the same result as when the worker ends up with an error. But I
think since it's not an appropriate behavior we should deal with it.
Any thoughts?

Regards,

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



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] ICU support on Windows
Next
From: Michael Paquier
Date:
Subject: Re: [HACKERS] pg_subscription_rel entry can be updated concurrently