forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc299477
committed
Fix filling of postmaster.pid in bootstrap/standalone mode.
We failed to ever fill the sixth line (LISTEN_ADDR), which caused theattempt to fill the seventh line (SHMEM_KEY) to fail, so that the sharedmemory key never got added to the file in standalone mode. This has beenbroken since we added more content to our lock files in 9.1.To fix, tweak the logic in CreateLockFile to add an empty LISTEN_ADDRline in standalone mode. This is a tad grotty, but since that functionalready knows almost everything there is to know about the contents oflock files, it doesn't seem that it's any better to hack it elsewhere.It's not clear how significant this bug really is, since a standalonebackend should never have any children and thus it seems not criticalto be able to check the nattch count of the shmem segment externally.But I'm going to back-patch the fix anyway.This problem had escaped notice because of an ancient (and in hindsightpretty dubious) decision to suppress LOG-level messages by default instandalone mode; so that the elog(LOG) complaint in AddToDataDirLockFilethat should have warned of the problem didn't do anything. Fixing thatis material for a separate patch though.1 parent3717f08 commitc299477
1 file changed
+12
-4
lines changedLines changed: 12 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
894 | 894 |
| |
895 | 895 |
| |
896 | 896 |
| |
897 |
| - | |
898 |
| - | |
899 |
| - | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
900 | 900 |
| |
901 | 901 |
| |
902 | 902 |
| |
| |||
905 | 905 |
| |
906 | 906 |
| |
907 | 907 |
| |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
908 | 915 |
| |
909 | 916 |
| |
910 | 917 |
| |
| |||
1078 | 1085 |
| |
1079 | 1086 |
| |
1080 | 1087 |
| |
1081 |
| - | |
| 1088 | + | |
| 1089 | + | |
1082 | 1090 |
| |
1083 | 1091 |
| |
1084 | 1092 |
| |
|
0 commit comments
Comments
(0)