Wake up launcher when enabling a subscription
authorPeter Eisentraut <peter_e@gmx.net>
Tue, 25 Apr 2017 18:40:33 +0000 (14:40 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Tue, 25 Apr 2017 18:40:33 +0000 (14:40 -0400)
commita3f17b9c315512e9c116dbc243056aad8b372e18
tree3cc5b11b9e0ecf99c4abde9899f72cba339f8bb1
parentef0ba572b6e163328a2292bf9d6de7c919bd7cdd
Wake up launcher when enabling a subscription

Otherwise one would have to wait up to DEFAULT_NAPTIME_PER_CYCLE until
the subscription worker is considered for starting.

There is a small race condition:  If one enables a subscription right
after disabling it, the launcher might not have registered the stopping
when receiving the wakeup signal for the re-enabling.  The start will
then not happen right away but after the full cycle time.

Author: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
src/backend/commands/subscriptioncmds.c