PostgreSQL Source Code  git master
proc.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * proc.h
4  * per-process shared memory data structures
5  *
6  *
7  * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/storage/proc.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef _PROC_H_
15 #define _PROC_H_
16 
17 #include "access/clog.h"
18 #include "access/xlogdefs.h"
19 #include "lib/ilist.h"
20 #include "storage/latch.h"
21 #include "storage/lock.h"
22 #include "storage/pg_sema.h"
23 #include "storage/proclist_types.h"
24 
25 /*
26  * Each backend advertises up to PGPROC_MAX_CACHED_SUBXIDS TransactionIds
27  * for non-aborted subtransactions of its current top transaction. These
28  * have to be treated as running XIDs by other backends.
29  *
30  * We also keep track of whether the cache overflowed (ie, the transaction has
31  * generated at least one subtransaction that didn't fit in the cache).
32  * If none of the caches have overflowed, we can assume that an XID that's not
33  * listed anywhere in the PGPROC array is not a running transaction. Else we
34  * have to look at pg_subtrans.
35  */
36 #define PGPROC_MAX_CACHED_SUBXIDS 64 /* XXX guessed-at value */
37 
38 typedef struct XidCacheStatus
39 {
40  /* number of cached subxids, never more than PGPROC_MAX_CACHED_SUBXIDS */
42  /* has PGPROC->subxids overflowed */
43  bool overflowed;
45 
46 struct XidCache
47 {
49 };
50 
51 /*
52  * Flags for PGPROC->statusFlags and PROC_HDR->statusFlags[]
53  */
54 #define PROC_IS_AUTOVACUUM 0x01 /* is it an autovac worker? */
55 #define PROC_IN_VACUUM 0x02 /* currently running lazy vacuum */
56 #define PROC_IN_SAFE_IC 0x04 /* currently running CREATE INDEX
57  * CONCURRENTLY or REINDEX
58  * CONCURRENTLY on non-expressional,
59  * non-partial index */
60 #define PROC_VACUUM_FOR_WRAPAROUND 0x08 /* set by autovac only */
61 #define PROC_IN_LOGICAL_DECODING 0x10 /* currently doing logical
62  * decoding outside xact */
63 
64 /* flags reset at EOXact */
65 #define PROC_VACUUM_STATE_MASK \
66  (PROC_IN_VACUUM | PROC_IN_SAFE_IC | PROC_VACUUM_FOR_WRAPAROUND)
67 
68 /*
69  * Flags that are valid to copy from another proc, the parallel leader
70  * process in practice. Currently, flags that are set during parallel
71  * vacuum and parallel index creation are allowed.
72  */
73 #define PROC_COPYABLE_FLAGS (PROC_IN_VACUUM | PROC_IN_SAFE_IC)
74 
75 /*
76  * We allow a small number of "weak" relation locks (AccessShareLock,
77  * RowShareLock, RowExclusiveLock) to be recorded in the PGPROC structure
78  * rather than the main lock table. This eases contention on the lock
79  * manager LWLocks. See storage/lmgr/README for additional details.
80  */
81 #define FP_LOCK_SLOTS_PER_BACKEND 16
82 
83 /*
84  * An invalid pgprocno. Must be larger than the maximum number of PGPROC
85  * structures we could possibly have. See comments for MAX_BACKENDS.
86  */
87 #define INVALID_PGPROCNO PG_INT32_MAX
88 
89 typedef enum
90 {
95 
96 /*
97  * Each backend has a PGPROC struct in shared memory. There is also a list of
98  * currently-unused PGPROC structs that will be reallocated to new backends.
99  *
100  * links: list link for any list the PGPROC is in. When waiting for a lock,
101  * the PGPROC is linked into that lock's waitProcs queue. A recycled PGPROC
102  * is linked into ProcGlobal's freeProcs list.
103  *
104  * Note: twophase.c also sets up a dummy PGPROC struct for each currently
105  * prepared transaction. These PGPROCs appear in the ProcArray data structure
106  * so that the prepared transactions appear to be still running and are
107  * correctly shown as holding locks. A prepared transaction PGPROC can be
108  * distinguished from a real one at need by the fact that it has pid == 0.
109  * The semaphore and lock-activity fields in a prepared-xact PGPROC are unused,
110  * but its myProcLocks[] lists are valid.
111  *
112  * We allow many fields of this struct to be accessed without locks, such as
113  * delayChkpt and isBackgroundWorker. However, keep in mind that writing
114  * mirrored ones (see below) requires holding ProcArrayLock or XidGenLock in
115  * at least shared mode, so that pgxactoff does not change concurrently.
116  *
117  * Mirrored fields:
118  *
119  * Some fields in PGPROC (see "mirrored in ..." comment) are mirrored into an
120  * element of more densely packed ProcGlobal arrays. These arrays are indexed
121  * by PGPROC->pgxactoff. Both copies need to be maintained coherently.
122  *
123  * NB: The pgxactoff indexed value can *never* be accessed without holding
124  * locks.
125  *
126  * See PROC_HDR for details.
127  */
128 struct PGPROC
129 {
130  /* proc->links MUST BE FIRST IN STRUCT (see ProcSleep,ProcWakeup,etc) */
131  SHM_QUEUE links; /* list link if process is in a list */
132  PGPROC **procgloballist; /* procglobal list that owns this PGPROC */
133 
134  PGSemaphore sem; /* ONE semaphore to sleep on */
136 
137  Latch procLatch; /* generic latch for process */
138 
139 
140  TransactionId xid; /* id of top-level transaction currently being
141  * executed by this proc, if running and XID
142  * is assigned; else InvalidTransactionId.
143  * mirrored in ProcGlobal->xids[pgxactoff] */
144 
145  TransactionId xmin; /* minimal running XID as it was when we were
146  * starting our xact, excluding LAZY VACUUM:
147  * vacuum must not remove tuples deleted by
148  * xid >= xmin ! */
149 
150  LocalTransactionId lxid; /* local id of top-level transaction currently
151  * being executed by this proc, if running;
152  * else InvalidLocalTransactionId */
153  int pid; /* Backend's process ID; 0 if prepared xact */
154 
155  int pgxactoff; /* offset into various ProcGlobal->arrays with
156  * data mirrored from this PGPROC */
157  int pgprocno;
158 
159  /* These fields are zero while a backend is still starting up: */
160  BackendId backendId; /* This backend's backend ID (if assigned) */
161  Oid databaseId; /* OID of database this backend is using */
162  Oid roleId; /* OID of role using this backend */
163 
164  Oid tempNamespaceId; /* OID of temp schema this backend is
165  * using */
166 
167  bool isBackgroundWorker; /* true if background worker. */
168 
169  /*
170  * While in hot standby mode, shows that a conflict signal has been sent
171  * for the current transaction. Set/cleared while holding ProcArrayLock,
172  * though not required. Accessed without lock, if needed.
173  */
175 
176  /* Info about LWLock the process is currently waiting for, if any. */
177  bool lwWaiting; /* true if waiting for an LW lock */
178  uint8 lwWaitMode; /* lwlock mode being waited for */
179  proclist_node lwWaitLink; /* position in LW lock wait list */
180 
181  /* Support for condition variables. */
182  proclist_node cvWaitLink; /* position in CV wait list */
183 
184  /* Info about lock the process is currently waiting for, if any. */
185  /* waitLock and waitProcLock are NULL if not currently waiting. */
186  LOCK *waitLock; /* Lock object we're sleeping on ... */
187  PROCLOCK *waitProcLock; /* Per-holder info for awaited lock */
188  LOCKMODE waitLockMode; /* type of lock we're waiting for */
189  LOCKMASK heldLocks; /* bitmask for lock types already held on this
190  * lock object by this backend */
191  pg_atomic_uint64 waitStart; /* time at which wait for lock acquisition
192  * started */
193 
194  bool delayChkpt; /* true if this proc delays checkpoint start */
195 
196  uint8 statusFlags; /* this backend's status flags, see PROC_*
197  * above. mirrored in
198  * ProcGlobal->statusFlags[pgxactoff] */
199 
200  /*
201  * Info to allow us to wait for synchronous replication, if needed.
202  * waitLSN is InvalidXLogRecPtr if not waiting; set only by user backend.
203  * syncRepState must not be touched except by owning process or WALSender.
204  * syncRepLinks used only while holding SyncRepLock.
205  */
206  XLogRecPtr waitLSN; /* waiting for this LSN or higher */
207  int syncRepState; /* wait state for sync rep */
208  SHM_QUEUE syncRepLinks; /* list link if process is in syncrep queue */
209 
210  /*
211  * All PROCLOCK objects for locks held or awaited by this backend are
212  * linked into one of these lists, according to the partition number of
213  * their lock.
214  */
216 
217  XidCacheStatus subxidStatus; /* mirrored with
218  * ProcGlobal->subxidStates[i] */
219  struct XidCache subxids; /* cache for subtransaction XIDs */
220 
221  /* Support for group XID clearing. */
222  /* true, if member of ProcArray group waiting for XID clear */
224  /* next ProcArray group member waiting for XID clear */
226 
227  /*
228  * latest transaction id among the transaction's main XID and
229  * subtransactions
230  */
232 
233  uint32 wait_event_info; /* proc's wait information */
234 
235  /* Support for group transaction status update. */
236  bool clogGroupMember; /* true, if member of clog group */
237  pg_atomic_uint32 clogGroupNext; /* next clog group member */
238  TransactionId clogGroupMemberXid; /* transaction id of clog group member */
239  XidStatus clogGroupMemberXidStatus; /* transaction status of clog
240  * group member */
241  int clogGroupMemberPage; /* clog page corresponding to
242  * transaction id of clog group member */
243  XLogRecPtr clogGroupMemberLsn; /* WAL location of commit record for clog
244  * group member */
245 
246  /* Lock manager data, recording fast-path locks taken by this backend. */
247  LWLock fpInfoLock; /* protects per-backend fast-path state */
248  uint64 fpLockBits; /* lock modes held for each fast-path slot */
249  Oid fpRelId[FP_LOCK_SLOTS_PER_BACKEND]; /* slots for rel oids */
250  bool fpVXIDLock; /* are we holding a fast-path VXID lock? */
251  LocalTransactionId fpLocalTransactionId; /* lxid for fast-path VXID
252  * lock */
253 
254  /*
255  * Support for lock groups. Use LockHashPartitionLockByProc on the group
256  * leader to get the LWLock protecting these fields.
257  */
258  PGPROC *lockGroupLeader; /* lock group leader, if I'm a member */
259  dlist_head lockGroupMembers; /* list of members, if I'm a leader */
260  dlist_node lockGroupLink; /* my member link, if I'm a member */
261 };
262 
263 /* NOTE: "typedef struct PGPROC PGPROC" appears in storage/lock.h. */
264 
265 
266 extern PGDLLIMPORT PGPROC *MyProc;
267 
268 /*
269  * There is one ProcGlobal struct for the whole database cluster.
270  *
271  * Adding/Removing an entry into the procarray requires holding *both*
272  * ProcArrayLock and XidGenLock in exclusive mode (in that order). Both are
273  * needed because the dense arrays (see below) are accessed from
274  * GetNewTransactionId() and GetSnapshotData(), and we don't want to add
275  * further contention by both using the same lock. Adding/Removing a procarray
276  * entry is much less frequent.
277  *
278  * Some fields in PGPROC are mirrored into more densely packed arrays (e.g.
279  * xids), with one entry for each backend. These arrays only contain entries
280  * for PGPROCs that have been added to the shared array with ProcArrayAdd()
281  * (in contrast to PGPROC array which has unused PGPROCs interspersed).
282  *
283  * The dense arrays are indexed by PGPROC->pgxactoff. Any concurrent
284  * ProcArrayAdd() / ProcArrayRemove() can lead to pgxactoff of a procarray
285  * member to change. Therefore it is only safe to use PGPROC->pgxactoff to
286  * access the dense array while holding either ProcArrayLock or XidGenLock.
287  *
288  * As long as a PGPROC is in the procarray, the mirrored values need to be
289  * maintained in both places in a coherent manner.
290  *
291  * The denser separate arrays are beneficial for three main reasons: First, to
292  * allow for as tight loops accessing the data as possible. Second, to prevent
293  * updates of frequently changing data (e.g. xmin) from invalidating
294  * cachelines also containing less frequently changing data (e.g. xid,
295  * statusFlags). Third to condense frequently accessed data into as few
296  * cachelines as possible.
297  *
298  * There are two main reasons to have the data mirrored between these dense
299  * arrays and PGPROC. First, as explained above, a PGPROC's array entries can
300  * only be accessed with either ProcArrayLock or XidGenLock held, whereas the
301  * PGPROC entries do not require that (obviously there may still be locking
302  * requirements around the individual field, separate from the concerns
303  * here). That is particularly important for a backend to efficiently checks
304  * it own values, which it often can safely do without locking. Second, the
305  * PGPROC fields allow to avoid unnecessary accesses and modification to the
306  * dense arrays. A backend's own PGPROC is more likely to be in a local cache,
307  * whereas the cachelines for the dense array will be modified by other
308  * backends (often removing it from the cache for other cores/sockets). At
309  * commit/abort time a check of the PGPROC value can avoid accessing/dirtying
310  * the corresponding array value.
311  *
312  * Basically it makes sense to access the PGPROC variable when checking a
313  * single backend's data, especially when already looking at the PGPROC for
314  * other reasons already. It makes sense to look at the "dense" arrays if we
315  * need to look at many / most entries, because we then benefit from the
316  * reduced indirection and better cross-process cache-ability.
317  *
318  * When entering a PGPROC for 2PC transactions with ProcArrayAdd(), the data
319  * in the dense arrays is initialized from the PGPROC while it already holds
320  * ProcArrayLock.
321  */
322 typedef struct PROC_HDR
323 {
324  /* Array of PGPROC structures (not including dummies for prepared txns) */
325  PGPROC *allProcs;
326 
327  /* Array mirroring PGPROC.xid for each PGPROC currently in the procarray */
329 
330  /*
331  * Array mirroring PGPROC.subxidStatus for each PGPROC currently in the
332  * procarray.
333  */
335 
336  /*
337  * Array mirroring PGPROC.statusFlags for each PGPROC currently in the
338  * procarray.
339  */
341 
342  /* Length of allProcs array */
344  /* Head of list of free PGPROC structures */
346  /* Head of list of autovacuum's free PGPROC structures */
348  /* Head of list of bgworker free PGPROC structures */
350  /* Head of list of walsender free PGPROC structures */
352  /* First pgproc waiting for group XID clear */
354  /* First pgproc waiting for group transaction status update */
356  /* WALWriter process's latch */
358  /* Checkpointer process's latch */
360  /* Current shared estimate of appropriate spins_per_delay value */
361  int spins_per_delay;
362  /* The proc of the Startup process, since not in ProcArray */
364  int startupProcPid;
365  /* Buffer id of the buffer that Startup process waits for pin on, or -1 */
367 } PROC_HDR;
368 
370 
371 extern PGPROC *PreparedXactProcs;
372 
373 /* Accessor for PGPROC given a pgprocno. */
374 #define GetPGProcByNumber(n) (&ProcGlobal->allProcs[(n)])
375 
376 /*
377  * We set aside some extra PGPROC structures for auxiliary processes,
378  * ie things that aren't full-fledged backends but need shmem access.
379  *
380  * Background writer, checkpointer, WAL writer and archiver run during normal
381  * operation. Startup process and WAL receiver also consume 2 slots, but WAL
382  * writer is launched only after startup has exited, so we only need 5 slots.
383  */
384 #define NUM_AUXILIARY_PROCS 5
385 
386 /* configurable options */
387 extern PGDLLIMPORT int DeadlockTimeout;
388 extern PGDLLIMPORT int StatementTimeout;
389 extern PGDLLIMPORT int LockTimeout;
392 extern bool log_lock_waits;
393 
394 
395 /*
396  * Function Prototypes
397  */
398 extern int ProcGlobalSemas(void);
399 extern Size ProcGlobalShmemSize(void);
400 extern void InitProcGlobal(void);
401 extern void InitProcess(void);
402 extern void InitProcessPhase2(void);
403 extern void InitAuxiliaryProcess(void);
404 
405 extern void PublishStartupProcessInformation(void);
406 extern void SetStartupBufferPinWaitBufId(int bufid);
407 extern int GetStartupBufferPinWaitBufId(void);
408 
409 extern bool HaveNFreeProcs(int n);
410 extern void ProcReleaseLocks(bool isCommit);
411 
412 extern void ProcQueueInit(PROC_QUEUE *queue);
413 extern ProcWaitStatus ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable);
414 extern PGPROC *ProcWakeup(PGPROC *proc, ProcWaitStatus waitStatus);
415 extern void ProcLockWakeup(LockMethod lockMethodTable, LOCK *lock);
416 extern void CheckDeadLockAlert(void);
417 extern bool IsWaitingForLock(void);
418 extern void LockErrorCleanup(void);
419 
420 extern void ProcWaitForSignal(uint32 wait_event_info);
421 extern void ProcSendSignal(int pid);
422 
423 extern PGPROC *AuxiliaryPidGetProc(int pid);
424 
425 extern void BecomeLockGroupLeader(void);
426 extern bool BecomeLockGroupMember(PGPROC *leader, int pid);
427 
428 #endif /* _PROC_H_ */
int BackendId
Definition: backendid.h:21
unsigned int uint32
Definition: c.h:441
#define PGDLLIMPORT
Definition: c.h:1318
uint32 LocalTransactionId
Definition: c.h:589
unsigned char uint8
Definition: c.h:439
uint32 TransactionId
Definition: c.h:587
size_t Size
Definition: c.h:540
int XidStatus
Definition: clog.h:25
int LOCKMODE
Definition: lockdefs.h:26
int LOCKMASK
Definition: lockdefs.h:25
#define NUM_LOCK_PARTITIONS
Definition: lwlock.h:87
unsigned int Oid
Definition: postgres_ext.h:31
bool log_lock_waits
Definition: proc.c:65
PGDLLIMPORT int IdleInTransactionSessionTimeout
Definition: proc.c:63
Size ProcGlobalShmemSize(void)
Definition: proc.c:102
bool IsWaitingForLock(void)
Definition: proc.c:699
PGDLLIMPORT int IdleSessionTimeout
Definition: proc.c:64
void InitAuxiliaryProcess(void)
Definition: proc.c:517
PGPROC * PreparedXactProcs
Definition: proc.c:82
PGDLLIMPORT PROC_HDR * ProcGlobal
Definition: proc.c:80
#define FP_LOCK_SLOTS_PER_BACKEND
Definition: proc.h:77
int GetStartupBufferPinWaitBufId(void)
Definition: proc.c:662
void ProcSendSignal(int pid)
Definition: proc.c:1909
PGPROC * ProcWakeup(PGPROC *proc, ProcWaitStatus waitStatus)
Definition: proc.c:1689
void PublishStartupProcessInformation(void)
Definition: proc.c:632
PGDLLIMPORT PGPROC * MyProc
Definition: proc.c:68
void ProcLockWakeup(LockMethod lockMethodTable, LOCK *lock)
Definition: proc.c:1726
struct PROC_HDR PROC_HDR
#define PGPROC_MAX_CACHED_SUBXIDS
Definition: proc.h:36
int ProcGlobalSemas(void)
Definition: proc.c:124
void ProcReleaseLocks(bool isCommit)
Definition: proc.c:792
void LockErrorCleanup(void)
Definition: proc.c:716
bool BecomeLockGroupMember(PGPROC *leader, int pid)
Definition: proc.c:1977
PGDLLIMPORT int StatementTimeout
Definition: proc.c:61
void BecomeLockGroupLeader(void)
Definition: proc.c:1947
PGDLLIMPORT int DeadlockTimeout
Definition: proc.c:60
PGPROC * AuxiliaryPidGetProc(int pid)
Definition: proc.c:992
PGDLLIMPORT int LockTimeout
Definition: proc.c:62
void InitProcess(void)
Definition: proc.c:303
void CheckDeadLockAlert(void)
Definition: proc.c:1871
void InitProcessPhase2(void)
Definition: proc.c:482
void InitProcGlobal(void)
Definition: proc.c:159
ProcWaitStatus ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
Definition: proc.c:1069
ProcWaitStatus
Definition: proc.h:86
@ PROC_WAIT_STATUS_OK
Definition: proc.h:87
@ PROC_WAIT_STATUS_WAITING
Definition: proc.h:88
@ PROC_WAIT_STATUS_ERROR
Definition: proc.h:89
void ProcQueueInit(PROC_QUEUE *queue)
Definition: proc.c:1045
struct XidCacheStatus XidCacheStatus
bool HaveNFreeProcs(int n)
Definition: proc.c:676
void SetStartupBufferPinWaitBufId(int bufid)
Definition: proc.c:650
void ProcWaitForSignal(uint32 wait_event_info)
Definition: proc.c:1897
Definition: lock.h:301
Definition: lwlock.h:32
Definition: latch.h:111
Definition: proc.h:125
PGPROC ** procgloballist
Definition: proc.h:128
LWLock fpInfoLock
Definition: proc.h:243
TransactionId xmin
Definition: proc.h:141
Oid fpRelId[FP_LOCK_SLOTS_PER_BACKEND]
Definition: proc.h:245
bool procArrayGroupMember
Definition: proc.h:219
LocalTransactionId lxid
Definition: proc.h:146
PROCLOCK * waitProcLock
Definition: proc.h:183
SHM_QUEUE links
Definition: proc.h:127
uint64 fpLockBits
Definition: proc.h:244
XLogRecPtr clogGroupMemberLsn
Definition: proc.h:239
pg_atomic_uint32 procArrayGroupNext
Definition: proc.h:221
uint8 lwWaitMode
Definition: proc.h:174
dlist_head lockGroupMembers
Definition: proc.h:255
int clogGroupMemberPage
Definition: proc.h:237
uint32 wait_event_info
Definition: proc.h:229
uint8 statusFlags
Definition: proc.h:192
bool recoveryConflictPending
Definition: proc.h:170
TransactionId clogGroupMemberXid
Definition: proc.h:234
Oid databaseId
Definition: proc.h:157
bool clogGroupMember
Definition: proc.h:232
pg_atomic_uint64 waitStart
Definition: proc.h:187
bool delayChkpt
Definition: proc.h:190
bool fpVXIDLock
Definition: proc.h:246
BackendId backendId
Definition: proc.h:156
int pid
Definition: proc.h:149
XLogRecPtr waitLSN
Definition: proc.h:202
bool isBackgroundWorker
Definition: proc.h:163
int syncRepState
Definition: proc.h:203
pg_atomic_uint32 clogGroupNext
Definition: proc.h:233
dlist_node lockGroupLink
Definition: proc.h:256
SHM_QUEUE syncRepLinks
Definition: proc.h:204
XidStatus clogGroupMemberXidStatus
Definition: proc.h:235
int pgxactoff
Definition: proc.h:151
XidCacheStatus subxidStatus
Definition: proc.h:213
LOCK * waitLock
Definition: proc.h:182
proclist_node lwWaitLink
Definition: proc.h:175
TransactionId xid
Definition: proc.h:136
LOCKMODE waitLockMode
Definition: proc.h:184
int pgprocno
Definition: proc.h:153
struct XidCache subxids
Definition: proc.h:215
bool lwWaiting
Definition: proc.h:173
PGPROC * lockGroupLeader
Definition: proc.h:254
LocalTransactionId fpLocalTransactionId
Definition: proc.h:247
TransactionId procArrayGroupMemberXid
Definition: proc.h:227
LOCKMASK heldLocks
Definition: proc.h:185
PGSemaphore sem
Definition: proc.h:130
Oid roleId
Definition: proc.h:158
ProcWaitStatus waitStatus
Definition: proc.h:131
proclist_node cvWaitLink
Definition: proc.h:178
Oid tempNamespaceId
Definition: proc.h:160
SHM_QUEUE myProcLocks[NUM_LOCK_PARTITIONS]
Definition: proc.h:211
Latch procLatch
Definition: proc.h:133
Definition: lock.h:362
Definition: proc.h:319
uint8 * statusFlags
Definition: proc.h:336
int startupProcPid
Definition: proc.h:360
XidCacheStatus * subxidStates
Definition: proc.h:330
PGPROC * startupProc
Definition: proc.h:359
PGPROC * walsenderFreeProcs
Definition: proc.h:347
Latch * walwriterLatch
Definition: proc.h:353
PGPROC * autovacFreeProcs
Definition: proc.h:343
PGPROC * bgworkerFreeProcs
Definition: proc.h:345
PGPROC * freeProcs
Definition: proc.h:341
int startupBufferPinWaitBufId
Definition: proc.h:362
PGPROC * allProcs
Definition: proc.h:321
pg_atomic_uint32 clogGroupFirst
Definition: proc.h:351
int spins_per_delay
Definition: proc.h:357
TransactionId * xids
Definition: proc.h:324
Latch * checkpointerLatch
Definition: proc.h:355
pg_atomic_uint32 procArrayGroupFirst
Definition: proc.h:349
uint32 allProcCount
Definition: proc.h:339
bool overflowed
Definition: proc.h:43
uint8 count
Definition: proc.h:41
Definition: proc.h:47
TransactionId xids[PGPROC_MAX_CACHED_SUBXIDS]
Definition: proc.h:48
uint64 XLogRecPtr
Definition: xlogdefs.h:21