forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd18643c
committed
Shift the responsibility for emitting "database system is shut down".
Historically this message has been emitted at the end of ShutdownXLOG().That's not an insane place for it in a standalone backend, but in thepostmaster environment we've grown a fair amount of stuff that happenslater, including archiver/walsender shutdown, stats collector shutdown,etc. Recent buildfarm experimentation showed that on slower machinesthere could be many seconds' delay between finishing ShutdownXLOG() andactual postmaster exit. That's fairly confusing, both for testingpurposes and for DBAs. Hence, move the code that prints this messageinto UnlinkLockFiles(), so that it comes out just after we remove thepostmaster's pidfile. That is a more appropriate definition of "is shutdown" from the point of view of "pg_ctl stop", for example. In general,removing the pidfile should be the last externally-visible action ofeither a postmaster or a standalone backend; compare commitd73d14c for instance. So this seemslike a reasonably future-proof approach.1 parentc319991 commitd18643c
2 files changed
+11
-4
lines changedLines changed: 0 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7948 | 7948 |
| |
7949 | 7949 |
| |
7950 | 7950 |
| |
7951 |
| - | |
7952 |
| - | |
7953 |
| - | |
7954 |
| - | |
7955 | 7951 |
| |
7956 | 7952 |
| |
7957 | 7953 |
| |
|
Lines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
724 | 724 |
| |
725 | 725 |
| |
726 | 726 |
| |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
727 | 738 |
| |
728 | 739 |
| |
729 | 740 |
| |
|
0 commit comments
Comments
(0)