- Notifications
You must be signed in to change notification settings - Fork5
Commit9f11fce
committed
Fix bug so logical rep launcher saves correctly time of last startup of worker.
Previously the logical replication launcher stored the last timestampwhen it started the worker, in the local variable "last_start_time",in order to check whether wal_retrive_retry_interval elapsed sincethe last startup of worker. If it has elapsed, the launcher seespg_subscription and starts new worker if necessary. This is forlimitting the startup of worker to once a wal_retrieve_retry_interval.The bug was that the variable "last_start_time" was defined andalways initialized with 0 at the beginning of the launcher's main loop.So even if it's set to the last timestamp in later phase of the loop,it's always reset to 0. Therefore the launcher could not checkcorrectly whether wal_retrieve_retry_interval elapsed sincethe last startup.This patch moves the variable "last_start_time" outside the main loopso that it will not be reset.Reviewed-by: Petr JelinekDiscussion:http://postgr.es/m/CAHGQGwGJrPO++XM4mFENAwpy1eGXKsGdguYv43GUgLgU-x8nTQ@mail.gmail.com1 parent82ebbeb commit9f11fce
1 file changed
+2
-1
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
781 | 781 |
| |
782 | 782 |
| |
783 | 783 |
| |
| 784 | + | |
| 785 | + | |
784 | 786 |
| |
785 | 787 |
| |
786 | 788 |
| |
| |||
812 | 814 |
| |
813 | 815 |
| |
814 | 816 |
| |
815 |
| - | |
816 | 817 |
| |
817 | 818 |
| |
818 | 819 |
| |
|
0 commit comments
Comments
(0)