forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2f932f7
committed
Consistently test for in-use shared memory.
postmaster startup scrutinizes any shared memory segment recorded inpostmaster.pid, exiting if that segment matches the current datadirectory and has an attached process. When the postmaster.pid file wasmissing, a starting postmaster used weaker checks. Change to use thesame checks in both scenarios. This increases the chance of a startupfailure, in lieu of data corruption, if the DBA does "kill -9 `head -n1postmaster.pid` && rm postmaster.pid && pg_ctl -w start". A postmasterwill no longer recycle segments pertaining to other data directories.That's good for production, but it's bad for integration tests thatcrash a postmaster and immediately delete its data directory. Such atest now leaks a segment indefinitely. No "make check-world" test doesthat. win32_shmem.c already avoided all these problems. In 9.6 andlater, enhance PostgresNode to facilitate testing. Back-patch to 9.4(all supported versions).Reviewed by Daniel Gustafsson and Kyotaro HORIGUCHI.Discussion:https://postgr.es/m/20130911033341.GD225735@tornado.leadboat.com1 parentaf052da commit2f932f7
File tree
11 files changed
+468
-177
lines changed- src
- backend
- port
- postmaster
- storage/ipc
- utils/init
- include/storage
- test
- perl
- recovery/t
- tools/msvc
11 files changed
+468
-177
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
430 | 430 |
| |
431 | 431 |
| |
432 | 432 |
| |
433 |
| - | |
| 433 | + | |
434 | 434 |
| |
435 | 435 |
| |
436 | 436 |
| |
437 | 437 |
| |
438 | 438 |
| |
439 |
| - | |
| 439 | + | |
440 | 440 |
| |
441 | 441 |
| |
442 | 442 |
| |
|
0 commit comments
Comments
(0)