Back-patch assorted latch-related fixes.
Tom Lane <tgl@sss.pgh.pa.us>
Back-patch assorted latch-related fixes. Fix a whole bunch of signal handlers that had been hacked to do things that might change errno, without adding the necessary save/restore logic for errno. Also make some minor fixes in unix_latch.c, and clean up bizarre and unsafe scheme for disowning the process's latch. While at it, rename the PGPROC latch field to procLatch for consistency with 9.2. Issues noted while reviewing a patch by Peter Geoghegan.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/xlog.c | modified | +16 −0 |
| src/backend/port/unix_latch.c | modified | +40 −7 |
| src/backend/replication/syncrep.c | modified | +5 −12 |
| src/backend/replication/walreceiver.c | modified | +4 −0 |
| src/backend/replication/walsender.c | modified | +16 −0 |
| src/backend/storage/lmgr/proc.c | modified | +31 −11 |
| src/backend/tcop/postgres.c | modified | +8 −6 |
| src/include/replication/syncrep.h | modified | +2 −2 |
| src/include/storage/proc.h | modified | +2 −1 |