- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit9c13b68

Amit Kapila
Reset the logical worker type while cleaning up other worker info.
Commit2a8b40e introduces the worker type field for logical replicationworkers, but forgot to reset the type when the worker exits. This can leadto recognizing a stopped worker as a valid logical replication worker.Fix it by resetting the worker type and additionally adding the safeguardto not use LogicalRepWorker until ->in_use is verified.Reported-by: Thomas Munro based on cfbot reports.Author: Hou Zhijie, Alvaro HerreraReviewed-by: Amit KapilaDiscussion:http://postgr.es/m/CA+hUKGK2RQh4LifVgBmkHsCYChP-65UwGXOmnCzYVa5aAt4GWg@mail.gmail.com1 parent252dcb3 commit9c13b68
File tree
2 files changed
+9
-4
lines changed- src
- backend/replication/logical
- include/replication
2 files changed
+9
-4
lines changedLines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
793 | 793 |
| |
794 | 794 |
| |
795 | 795 |
| |
| 796 | + | |
796 | 797 |
| |
797 | 798 |
| |
798 | 799 |
| |
| |||
862 | 863 |
| |
863 | 864 |
| |
864 | 865 |
| |
865 |
| - | |
| 866 | + | |
866 | 867 |
| |
867 | 868 |
| |
868 | 869 |
| |
| |||
889 | 890 |
| |
890 | 891 |
| |
891 | 892 |
| |
892 |
| - | |
| 893 | + | |
893 | 894 |
| |
894 | 895 |
| |
895 | 896 |
| |
|
Lines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
327 | 327 |
| |
328 | 328 |
| |
329 | 329 |
| |
330 |
| - | |
331 |
| - | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
332 | 334 |
| |
333 | 335 |
| |
334 | 336 |
| |
| |||
339 | 341 |
| |
340 | 342 |
| |
341 | 343 |
| |
| 344 | + | |
342 | 345 |
| |
343 | 346 |
| |
344 | 347 |
| |
345 | 348 |
| |
346 | 349 |
| |
347 | 350 |
| |
| 351 | + | |
348 | 352 |
| |
349 | 353 |
| |
350 | 354 |
| |
|
0 commit comments
Comments
(0)