mirror of
https://github.com/postgres/postgres.git
synced 2025-05-06 19:59:18 +03:00
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>
This commit is contained in:
parent
ef0ba572b6
commit
a3f17b9c31
@ -644,6 +644,9 @@ AlterSubscription(AlterSubscriptionStmt *stmt)
|
||||
BoolGetDatum(enabled);
|
||||
replaces[Anum_pg_subscription_subenabled - 1] = true;
|
||||
|
||||
if (enabled)
|
||||
ApplyLauncherWakeupAtCommit();
|
||||
|
||||
update_tuple = true;
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user