summaryrefslogtreecommitdiff
path: root/src/include/storage/proc.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-08-10 12:20:45 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2011-08-10 12:20:45 -0400
commit989f530d3f793ed1c990d705d0958bfd2a533b85 (patch)
treea6676b9e587c9caf40b0e8dfd99bbd6bab4dd35f /src/include/storage/proc.h
parent74d099494c5853a44188316ba117a8909b299d40 (diff)
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.
Diffstat (limited to 'src/include/storage/proc.h')
-rw-r--r--src/include/storage/proc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h
index af9c1292fc8..56758da04f2 100644
--- a/src/include/storage/proc.h
+++ b/src/include/storage/proc.h
@@ -118,13 +118,14 @@ struct PGPROC
LOCKMASK heldLocks; /* bitmask for lock types already held on this
* lock object by this backend */
+ Latch procLatch; /* generic latch for process */
+
/*
* Info to allow us to wait for synchronous replication, if needed.
* waitLSN is InvalidXLogRecPtr if not waiting; set only by user backend.
* syncRepState must not be touched except by owning process or WALSender.
* syncRepLinks used only while holding SyncRepLock.
*/
- Latch waitLatch; /* allow us to wait for sync rep */
XLogRecPtr waitLSN; /* waiting for this LSN or higher */
int syncRepState; /* wait state for sync rep */
SHM_QUEUE syncRepLinks; /* list link if process is in syncrep queue */