Stop table sync workers when subscription relation entry is removed
authorPeter Eisentraut <peter_e@gmx.net>
Fri, 9 Jun 2017 13:47:52 +0000 (09:47 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Mon, 12 Jun 2017 12:53:37 +0000 (08:53 -0400)
commitddd7b22b225ae41d16ceb218b387645cb9becfdc
tree7cb6883325edf9c7f05c8e9fb867f025d38d6476
parenteab86897bd8cbeb21ae8959ca9a095ce7cb663df
Stop table sync workers when subscription relation entry is removed

When a table sync worker is in waiting state and the subscription table
entry is removed because of a concurrent subscription refresh, the
worker could be left orphaned.  To avoid that, explicitly stop the
worker when the pg_subscription_rel entry is removed.

Reported-by: Masahiko Sawada <sawada.mshk@gmail.com>
src/backend/commands/subscriptioncmds.c