Stop table sync workers when subscription relation entry is removed

Peter Eisentraut <peter_e@gmx.net>

Commit: ddd7b22b225ae41d16ceb218b387645cb9becfdc
Author: Peter Eisentraut <peter_e@gmx.net>
Date: 2017-06-12T12:53:37Z
Releases: 10.0
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>

Files

PathChange+/−
src/backend/commands/subscriptioncmds.c modified +2 −0