forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf05ed5a
committed
Initialize atomic variable waitStart in PGPROC, at postmaster startup.
Commit46d6e5f added the atomic variable "waitStart" into PGPROC struct,to store the time at which wait for lock acquisition started. Previouslythis variable was initialized every time each backend started. Instead,this commit makes postmaster initialize it at the startup, to ensure thatthe variable should be initialized before any use of it.This commit also moves the code to initialize "waitStart" variable forprepare transaction, from TwoPhaseGetDummyProc() to MarkAsPreparingGuts().Because MarkAsPreparingGuts() is more proper place to do that sinceit initializes other PGPROC variables.Author: Fujii MasaoReviewed-by: Atsushi TorikoshiDiscussion:https://postgr.es/m/1df88660-6f08-cc6e-b7e2-f85296a2bdab@oss.nttdata.com1 parentefbfb64 commitf05ed5a
2 files changed
+5
-10
lines changedLines changed: 2 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
475 | 475 |
| |
476 | 476 |
| |
477 | 477 |
| |
| 478 | + | |
478 | 479 |
| |
479 | 480 |
| |
480 | 481 |
| |
| |||
873 | 874 |
| |
874 | 875 |
| |
875 | 876 |
| |
876 |
| - | |
877 | 877 |
| |
878 |
| - | |
879 |
| - | |
880 |
| - | |
881 |
| - | |
882 |
| - | |
883 |
| - | |
884 |
| - | |
| 878 | + | |
885 | 879 |
| |
886 | 880 |
| |
887 | 881 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
281 | 281 |
| |
282 | 282 |
| |
283 | 283 |
| |
| 284 | + | |
284 | 285 |
| |
285 | 286 |
| |
286 | 287 |
| |
| |||
402 | 403 |
| |
403 | 404 |
| |
404 | 405 |
| |
405 |
| - | |
| 406 | + | |
406 | 407 |
| |
407 | 408 |
| |
408 | 409 |
| |
| |||
581 | 582 |
| |
582 | 583 |
| |
583 | 584 |
| |
584 |
| - | |
| 585 | + | |
585 | 586 |
| |
586 | 587 |
| |
587 | 588 |
| |
|
0 commit comments
Comments
(0)