forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7c414cd
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 parentdb4bc99 commit7c414cd
File tree
11 files changed
+467
-176
lines changed- src
- backend
- port
- postmaster
- storage/ipc
- utils/init
- include/storage
- test
- perl
- recovery/t
- tools/msvc
11 files changed
+467
-176
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
| 386 | + | |
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
391 | | - | |
| 391 | + | |
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
| |||
0 commit comments
Comments
(0)