PostgreSQL Source Code git master
Loading...
Searching...
No Matches
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-2026, 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 "miscadmin.h"
21#include "storage/latch.h"
22#include "storage/lock.h"
23#include "storage/pg_sema.h"
25#include "storage/procnumber.h"
26
27/*
28 * Each backend advertises up to PGPROC_MAX_CACHED_SUBXIDS TransactionIds
29 * for non-aborted subtransactions of its current top transaction. These
30 * have to be treated as running XIDs by other backends.
31 *
32 * We also keep track of whether the cache overflowed (ie, the transaction has
33 * generated at least one subtransaction that didn't fit in the cache).
34 * If none of the caches have overflowed, we can assume that an XID that's not
35 * listed anywhere in the PGPROC array is not a running transaction. Else we
36 * have to look at pg_subtrans.
37 *
38 * See src/test/isolation/specs/subxid-overflow.spec if you change this.
39 */
40#define PGPROC_MAX_CACHED_SUBXIDS 64 /* XXX guessed-at value */
41
42typedef struct XidCacheStatus
43{
44 /* number of cached subxids, never more than PGPROC_MAX_CACHED_SUBXIDS */
46 /* has PGPROC->subxids overflowed */
49
54
55/*
56 * Flags for PGPROC->statusFlags and PROC_HDR->statusFlags[]
57 */
58#define PROC_IS_AUTOVACUUM 0x01 /* is it an autovac worker? */
59#define PROC_IN_VACUUM 0x02 /* currently running lazy vacuum */
60#define PROC_IN_SAFE_IC 0x04 /* currently running CREATE INDEX
61 * CONCURRENTLY or REINDEX
62 * CONCURRENTLY on non-expressional,
63 * non-partial index */
64#define PROC_VACUUM_FOR_WRAPAROUND 0x08 /* set by autovac only */
65#define PROC_IN_LOGICAL_DECODING 0x10 /* currently doing logical
66 * decoding outside xact */
67#define PROC_AFFECTS_ALL_HORIZONS 0x20 /* this proc's xmin must be
68 * included in vacuum horizons
69 * in all databases */
70
71/* flags reset at EOXact */
72#define PROC_VACUUM_STATE_MASK \
73 (PROC_IN_VACUUM | PROC_IN_SAFE_IC | PROC_VACUUM_FOR_WRAPAROUND)
74
75/*
76 * Xmin-related flags. Make sure any flags that affect how the process' Xmin
77 * value is interpreted by VACUUM are included here.
78 */
79#define PROC_XMIN_FLAGS (PROC_IN_VACUUM | PROC_IN_SAFE_IC)
80
81/*
82 * We allow a limited number of "weak" relation locks (AccessShareLock,
83 * RowShareLock, RowExclusiveLock) to be recorded in the PGPROC structure
84 * (or rather in shared memory referenced from PGPROC) rather than the main
85 * lock table. This eases contention on the lock manager LWLocks. See
86 * storage/lmgr/README for additional details.
87 */
89
90/*
91 * Define the maximum number of fast-path locking groups per backend.
92 * This must be a power-of-two value. The actual number of fast-path
93 * lock groups is calculated in InitializeFastPathLocks() based on
94 * max_locks_per_transaction. 1024 is an arbitrary upper limit (matching
95 * max_locks_per_transaction = 16k). Values over 1024 are unlikely to be
96 * beneficial as there are bottlenecks we'll hit way before that.
97 */
98#define FP_LOCK_GROUPS_PER_BACKEND_MAX 1024
99#define FP_LOCK_SLOTS_PER_GROUP 16 /* don't change */
100#define FastPathLockSlotsPerBackend() \
101 (FP_LOCK_SLOTS_PER_GROUP * FastPathLockGroupsPerBackend)
102
103/*
104 * Flags for PGPROC.delayChkptFlags
105 *
106 * These flags can be used to delay the start or completion of a checkpoint
107 * for short periods. A flag is in effect if the corresponding bit is set in
108 * the PGPROC of any backend.
109 *
110 * For our purposes here, a checkpoint has three phases: (1) determine the
111 * location to which the redo pointer will be moved, (2) write all the
112 * data durably to disk, and (3) WAL-log the checkpoint.
113 *
114 * Setting DELAY_CHKPT_START prevents the system from moving from phase 1
115 * to phase 2. This is useful when we are performing a WAL-logged modification
116 * of data that will be flushed to disk in phase 2. By setting this flag
117 * before writing WAL and clearing it after we've both written WAL and
118 * performed the corresponding modification, we ensure that if the WAL record
119 * is inserted prior to the new redo point, the corresponding data changes will
120 * also be flushed to disk before the checkpoint can complete. (In the
121 * extremely common case where the data being modified is in shared buffers
122 * and we acquire an exclusive content lock and MarkBufferDirty() on the
123 * relevant buffers before writing WAL, this mechanism is not needed, because
124 * phase 2 will block until we release the content lock and then flush the
125 * modified data to disk. See transam/README and SyncOneBuffer().)
126 *
127 * Setting DELAY_CHKPT_COMPLETE prevents the system from moving from phase 2
128 * to phase 3. This is useful if we are performing a WAL-logged operation that
129 * might invalidate buffers, such as relation truncation. In this case, we need
130 * to ensure that any buffers which were invalidated and thus not flushed by
131 * the checkpoint are actually destroyed on disk. Replay can cope with a file
132 * or block that doesn't exist, but not with a block that has the wrong
133 * contents.
134 *
135 * Setting DELAY_CHKPT_IN_COMMIT is similar to setting DELAY_CHKPT_START, but
136 * it explicitly indicates that the reason for delaying the checkpoint is due
137 * to a transaction being within a critical commit section. We need this new
138 * flag to ensure all the transactions that have acquired commit timestamp are
139 * finished before we allow the logical replication client to advance its xid
140 * which is used to hold back dead rows for conflict detection.
141 */
142#define DELAY_CHKPT_START (1<<0)
143#define DELAY_CHKPT_COMPLETE (1<<1)
144#define DELAY_CHKPT_IN_COMMIT (DELAY_CHKPT_START | 1<<2)
145
146typedef enum
147{
152
153/*
154 * Each backend has a PGPROC struct in shared memory. There is also a list of
155 * currently-unused PGPROC structs that will be reallocated to new backends.
156 *
157 * links: list link for any list the PGPROC is in. When waiting for a lock,
158 * the PGPROC is linked into that lock's waitProcs queue. A recycled PGPROC
159 * is linked into ProcGlobal's freeProcs list.
160 *
161 * Note: twophase.c also sets up a dummy PGPROC struct for each currently
162 * prepared transaction. These PGPROCs appear in the ProcArray data structure
163 * so that the prepared transactions appear to be still running and are
164 * correctly shown as holding locks. A prepared transaction PGPROC can be
165 * distinguished from a real one at need by the fact that it has pid == 0.
166 * The semaphore and lock-activity fields in a prepared-xact PGPROC are unused,
167 * but its myProcLocks[] lists are valid.
168 *
169 * We allow many fields of this struct to be accessed without locks, such as
170 * delayChkptFlags and backendType. However, keep in mind that writing
171 * mirrored ones (see below) requires holding ProcArrayLock or XidGenLock in
172 * at least shared mode, so that pgxactoff does not change concurrently.
173 *
174 * Mirrored fields:
175 *
176 * Some fields in PGPROC (see "mirrored in ..." comment) are mirrored into an
177 * element of more densely packed ProcGlobal arrays. These arrays are indexed
178 * by PGPROC->pgxactoff. Both copies need to be maintained coherently.
180 * NB: The pgxactoff indexed value can *never* be accessed without holding
181 * locks.
183 * See PROC_HDR for details.
184 */
185struct PGPROC
186{
187 dlist_node links; /* list link if process is in a list */
188 dlist_head *procgloballist; /* procglobal list that owns this PGPROC */
189
190 PGSemaphore sem; /* ONE semaphore to sleep on */
192
193 Latch procLatch; /* generic latch for process */
194
196 TransactionId xid; /* id of top-level transaction currently being
197 * executed by this proc, if running and XID
198 * is assigned; else InvalidTransactionId.
199 * mirrored in ProcGlobal->xids[pgxactoff] */
201 TransactionId xmin; /* minimal running XID as it was when we were
202 * starting our xact, excluding LAZY VACUUM:
203 * vacuum must not remove tuples deleted by
204 * xid >= xmin ! */
205
206 int pid; /* Backend's process ID; 0 if prepared xact */
207
208 int pgxactoff; /* offset into various ProcGlobal->arrays with
209 * data mirrored from this PGPROC */
210
211 /*
212 * Currently running top-level transaction's virtual xid. Together these
213 * form a VirtualTransactionId, but we don't use that struct because this
214 * is not atomically assignable as whole, and we want to enforce code to
215 * consider both parts separately. See comments at VirtualTransactionId.
216 */
217 struct
219 ProcNumber procNumber; /* For regular backends, equal to
220 * GetNumberFromPGProc(proc). For prepared
221 * xacts, ID of the original backend that
222 * processed the transaction. For unused
223 * PGPROC entries, INVALID_PROC_NUMBER. */
224 LocalTransactionId lxid; /* local id of top-level transaction
225 * currently * being executed by this
226 * proc, if running; else
227 * InvalidLocalTransactionId */
229
230 /* These fields are zero while a backend is still starting up: */
231 Oid databaseId; /* OID of database this backend is using */
232 Oid roleId; /* OID of role using this backend */
233
234 Oid tempNamespaceId; /* OID of temp schema this backend is
235 * using */
236
237 BackendType backendType; /* what kind of process is this? */
238
239 /*
240 * Info about LWLock the process is currently waiting for, if any.
242 * This is currently used both for lwlocks and buffer content locks, which
243 * is acceptable, although not pretty, because a backend can't wait for
244 * both types of locks at the same time.
245 */
246 uint8 lwWaiting; /* see LWLockWaitState */
247 uint8 lwWaitMode; /* lwlock mode being waited for */
248 proclist_node lwWaitLink; /* position in LW lock wait list */
250 /* Support for condition variables. */
251 proclist_node cvWaitLink; /* position in CV wait list */
253 /* Info about lock the process is currently waiting for, if any. */
254 /* waitLock and waitProcLock are NULL if not currently waiting. */
255 LOCK *waitLock; /* Lock object we're sleeping on ... */
256 PROCLOCK *waitProcLock; /* Per-holder info for awaited lock */
257 LOCKMODE waitLockMode; /* type of lock we're waiting for */
258 LOCKMASK heldLocks; /* bitmask for lock types already held on this
259 * lock object by this backend */
260 pg_atomic_uint64 waitStart; /* time at which wait for lock acquisition
261 * started */
262
263 int delayChkptFlags; /* for DELAY_CHKPT_* flags */
264
265 uint8 statusFlags; /* this backend's status flags, see PROC_*
266 * above. mirrored in
267 * ProcGlobal->statusFlags[pgxactoff] */
268
269 /*
270 * Info to allow us to wait for synchronous replication, if needed.
271 * waitLSN is InvalidXLogRecPtr if not waiting; set only by user backend.
272 * syncRepState must not be touched except by owning process or WALSender.
273 * syncRepLinks used only while holding SyncRepLock.
274 */
275 XLogRecPtr waitLSN; /* waiting for this LSN or higher */
276 int syncRepState; /* wait state for sync rep */
277 dlist_node syncRepLinks; /* list link if process is in syncrep queue */
279 /*
280 * All PROCLOCK objects for locks held or awaited by this backend are
281 * linked into one of these lists, according to the partition number of
282 * their lock.
283 */
285
286 XidCacheStatus subxidStatus; /* mirrored with
287 * ProcGlobal->subxidStates[i] */
288 struct XidCache subxids; /* cache for subtransaction XIDs */
289
290 /* Support for group XID clearing. */
291 /* true, if member of ProcArray group waiting for XID clear */
293 /* next ProcArray group member waiting for XID clear */
295
296 /*
297 * latest transaction id among the transaction's main XID and
298 * subtransactions
299 */
302 uint32 wait_event_info; /* proc's wait information */
303
304 /* Support for group transaction status update. */
305 bool clogGroupMember; /* true, if member of clog group */
306 pg_atomic_uint32 clogGroupNext; /* next clog group member */
307 TransactionId clogGroupMemberXid; /* transaction id of clog group member */
308 XidStatus clogGroupMemberXidStatus; /* transaction status of clog
309 * group member */
310 int64 clogGroupMemberPage; /* clog page corresponding to
311 * transaction id of clog group member */
312 XLogRecPtr clogGroupMemberLsn; /* WAL location of commit record for clog
313 * group member */
315 /* Lock manager data, recording fast-path locks taken by this backend. */
316 LWLock fpInfoLock; /* protects per-backend fast-path state */
317 uint64 *fpLockBits; /* lock modes held for each fast-path slot */
318 Oid *fpRelId; /* slots for rel oids */
319 bool fpVXIDLock; /* are we holding a fast-path VXID lock? */
320 LocalTransactionId fpLocalTransactionId; /* lxid for fast-path VXID
321 * lock */
323 /*
324 * Support for lock groups. Use LockHashPartitionLockByProc on the group
325 * leader to get the LWLock protecting these fields.
326 */
327 PGPROC *lockGroupLeader; /* lock group leader, if I'm a member */
328 dlist_head lockGroupMembers; /* list of members, if I'm a leader */
329 dlist_node lockGroupLink; /* my member link, if I'm a member */
330};
331
332/* NOTE: "typedef struct PGPROC PGPROC" appears in storage/lock.h. */
333
334
336
337/*
338 * There is one ProcGlobal struct for the whole database cluster.
339 *
340 * Adding/Removing an entry into the procarray requires holding *both*
341 * ProcArrayLock and XidGenLock in exclusive mode (in that order). Both are
342 * needed because the dense arrays (see below) are accessed from
343 * GetNewTransactionId() and GetSnapshotData(), and we don't want to add
344 * further contention by both using the same lock. Adding/Removing a procarray
345 * entry is much less frequent.
346 *
347 * Some fields in PGPROC are mirrored into more densely packed arrays (e.g.
348 * xids), with one entry for each backend. These arrays only contain entries
349 * for PGPROCs that have been added to the shared array with ProcArrayAdd()
350 * (in contrast to PGPROC array which has unused PGPROCs interspersed).
351 *
352 * The dense arrays are indexed by PGPROC->pgxactoff. Any concurrent
353 * ProcArrayAdd() / ProcArrayRemove() can lead to pgxactoff of a procarray
354 * member to change. Therefore it is only safe to use PGPROC->pgxactoff to
355 * access the dense array while holding either ProcArrayLock or XidGenLock.
356 *
357 * As long as a PGPROC is in the procarray, the mirrored values need to be
358 * maintained in both places in a coherent manner.
359 *
360 * The denser separate arrays are beneficial for three main reasons: First, to
361 * allow for as tight loops accessing the data as possible. Second, to prevent
362 * updates of frequently changing data (e.g. xmin) from invalidating
363 * cachelines also containing less frequently changing data (e.g. xid,
364 * statusFlags). Third to condense frequently accessed data into as few
365 * cachelines as possible.
366 *
367 * There are two main reasons to have the data mirrored between these dense
368 * arrays and PGPROC. First, as explained above, a PGPROC's array entries can
369 * only be accessed with either ProcArrayLock or XidGenLock held, whereas the
370 * PGPROC entries do not require that (obviously there may still be locking
371 * requirements around the individual field, separate from the concerns
372 * here). That is particularly important for a backend to efficiently checks
373 * it own values, which it often can safely do without locking. Second, the
374 * PGPROC fields allow to avoid unnecessary accesses and modification to the
375 * dense arrays. A backend's own PGPROC is more likely to be in a local cache,
376 * whereas the cachelines for the dense array will be modified by other
377 * backends (often removing it from the cache for other cores/sockets). At
378 * commit/abort time a check of the PGPROC value can avoid accessing/dirtying
379 * the corresponding array value.
380 *
381 * Basically it makes sense to access the PGPROC variable when checking a
382 * single backend's data, especially when already looking at the PGPROC for
383 * other reasons already. It makes sense to look at the "dense" arrays if we
384 * need to look at many / most entries, because we then benefit from the
385 * reduced indirection and better cross-process cache-ability.
386 *
387 * When entering a PGPROC for 2PC transactions with ProcArrayAdd(), the data
388 * in the dense arrays is initialized from the PGPROC while it already holds
389 * ProcArrayLock.
390 */
391typedef struct PROC_HDR
392{
393 /* Array of PGPROC structures (not including dummies for prepared txns) */
395
396 /* Array mirroring PGPROC.xid for each PGPROC currently in the procarray */
398
399 /*
400 * Array mirroring PGPROC.subxidStatus for each PGPROC currently in the
401 * procarray.
402 */
404
405 /*
406 * Array mirroring PGPROC.statusFlags for each PGPROC currently in the
407 * procarray.
408 */
411 /* Length of allProcs array */
413 /* Head of list of free PGPROC structures */
415 /* Head of list of autovacuum & special worker free PGPROC structures */
417 /* Head of list of bgworker free PGPROC structures */
419 /* Head of list of walsender free PGPROC structures */
421 /* First pgproc waiting for group XID clear */
423 /* First pgproc waiting for group transaction status update */
426 /*
427 * Current slot numbers of some auxiliary processes. There can be only one
428 * of each of these running at a time.
429 */
432
433 /* Current shared estimate of appropriate spins_per_delay value */
434 int spins_per_delay;
435 /* Buffer id of the buffer that Startup process waits for pin on, or -1 */
437} PROC_HDR;
438
442
443/*
444 * Accessors for getting PGPROC given a ProcNumber and vice versa.
445 */
446#define GetPGProcByNumber(n) (&ProcGlobal->allProcs[(n)])
447#define GetNumberFromPGProc(proc) ((proc) - &ProcGlobal->allProcs[0])
448
449/*
450 * We set aside some extra PGPROC structures for "special worker" processes,
451 * which are full-fledged backends (they can run transactions)
452 * but are unique animals that there's never more than one of.
453 * Currently there are two such processes: the autovacuum launcher
454 * and the slotsync worker.
455 */
456#define NUM_SPECIAL_WORKER_PROCS 2
457
458/*
459 * We set aside some extra PGPROC structures for auxiliary processes,
460 * ie things that aren't full-fledged backends (they cannot run transactions
461 * or take heavyweight locks) but need shmem access.
463 * Background writer, checkpointer, WAL writer, WAL summarizer, and archiver
464 * run during normal operation. Startup process and WAL receiver also consume
465 * 2 slots, but WAL writer is launched only after startup has exited, so we
466 * only need 6 slots.
467 */
468#define MAX_IO_WORKERS 32
469#define NUM_AUXILIARY_PROCS (6 + MAX_IO_WORKERS)
470
471
472/* configurable options */
475extern PGDLLIMPORT int LockTimeout;
479extern PGDLLIMPORT bool log_lock_waits;
480
481#ifdef EXEC_BACKEND
484#endif
485
486
487/*
488 * Function Prototypes
489 */
490extern int ProcGlobalSemas(void);
491extern Size ProcGlobalShmemSize(void);
492extern void InitProcGlobal(void);
493extern void InitProcess(void);
494extern void InitProcessPhase2(void);
495extern void InitAuxiliaryProcess(void);
496
497extern void SetStartupBufferPinWaitBufId(int bufid);
498extern int GetStartupBufferPinWaitBufId(void);
499
500extern bool HaveNFreeProcs(int n, int *nfree);
501extern void ProcReleaseLocks(bool isCommit);
502
506extern void ProcWakeup(PGPROC *proc, ProcWaitStatus waitStatus);
508extern void CheckDeadLockAlert(void);
509extern void LockErrorCleanup(void);
513 int *lockHoldersNum);
514
515extern void ProcWaitForSignal(uint32 wait_event_info);
516extern void ProcSendSignal(ProcNumber procNumber);
517
518extern PGPROC *AuxiliaryPidGetProc(int pid);
519
520extern void BecomeLockGroupLeader(void);
521extern bool BecomeLockGroupMember(PGPROC *leader, int pid);
522
523#endif /* _PROC_H_ */
#define PGDLLIMPORT
Definition c.h:1334
uint8_t uint8
Definition c.h:544
int64_t int64
Definition c.h:543
uint64_t uint64
Definition c.h:547
uint32_t uint32
Definition c.h:546
uint32 LocalTransactionId
Definition c.h:668
uint32 TransactionId
Definition c.h:666
size_t Size
Definition c.h:619
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:95
BackendType
Definition miscadmin.h:338
unsigned int Oid
static int fb(int x)
ProcWaitStatus JoinWaitQueue(LOCALLOCK *locallock, LockMethod lockMethodTable, bool dontWait)
Definition proc.c:1145
void ProcSendSignal(ProcNumber procNumber)
Definition proc.c:1991
PGDLLIMPORT int IdleInTransactionSessionTimeout
Definition proc.c:61
Size ProcGlobalShmemSize(void)
Definition proc.c:140
void ProcWakeup(PGPROC *proc, ProcWaitStatus waitStatus)
Definition proc.c:1716
PGDLLIMPORT int IdleSessionTimeout
Definition proc.c:63
bool HaveNFreeProcs(int n, int *nfree)
Definition proc.c:786
void InitAuxiliaryProcess(void)
Definition proc.c:619
void GetLockHoldersAndWaiters(LOCALLOCK *locallock, StringInfo lock_holders_sbuf, StringInfo lock_waiters_sbuf, int *lockHoldersNum)
Definition proc.c:1905
PGDLLIMPORT PROC_HDR * ProcGlobal
Definition proc.c:79
int GetStartupBufferPinWaitBufId(void)
Definition proc.c:770
ProcWaitStatus ProcSleep(LOCALLOCK *locallock)
Definition proc.c:1314
PGDLLIMPORT PGPROC * MyProc
Definition proc.c:67
void ProcLockWakeup(LockMethod lockMethodTable, LOCK *lock)
Definition proc.c:1744
#define PGPROC_MAX_CACHED_SUBXIDS
Definition proc.h:40
int ProcGlobalSemas(void)
Definition proc.c:159
void ProcReleaseLocks(bool isCommit)
Definition proc.c:895
void LockErrorCleanup(void)
Definition proc.c:817
bool BecomeLockGroupMember(PGPROC *leader, int pid)
Definition proc.c:2036
PGDLLIMPORT int StatementTimeout
Definition proc.c:59
void BecomeLockGroupLeader(void)
Definition proc.c:2006
PGDLLIMPORT int DeadlockTimeout
Definition proc.c:58
PGDLLIMPORT int LockTimeout
Definition proc.c:60
void InitProcess(void)
Definition proc.c:395
void CheckDeadLockAlert(void)
Definition proc.c:1878
void InitProcessPhase2(void)
Definition proc.c:584
void InitProcGlobal(void)
Definition proc.c:194
PGDLLIMPORT bool log_lock_waits
Definition proc.c:64
ProcWaitStatus
Definition proc.h:141
@ PROC_WAIT_STATUS_OK
Definition proc.h:142
@ PROC_WAIT_STATUS_WAITING
Definition proc.h:143
@ PROC_WAIT_STATUS_ERROR
Definition proc.h:144
PGDLLIMPORT PGPROC * PreparedXactProcs
Definition proc.c:81
PGDLLIMPORT int TransactionTimeout
Definition proc.c:62
PGPROC * AuxiliaryPidGetProc(int pid)
Definition proc.c:1096
void SetStartupBufferPinWaitBufId(int bufid)
Definition proc.c:758
void ProcWaitForSignal(uint32 wait_event_info)
Definition proc.c:1979
PGDLLIMPORT int FastPathLockGroupsPerBackend
Definition lock.c:202
int ProcNumber
Definition procnumber.h:24
NON_EXEC_STATIC PGPROC * AuxiliaryProcs
Definition proc.c:80
NON_EXEC_STATIC slock_t * ProcStructLock
Definition proc.c:76
Definition lock.h:311
Definition latch.h:114
Definition proc.h:180
LWLock fpInfoLock
Definition proc.h:310
TransactionId xmin
Definition proc.h:195
bool procArrayGroupMember
Definition proc.h:286
LocalTransactionId lxid
Definition proc.h:218
PROCLOCK * waitProcLock
Definition proc.h:250
XLogRecPtr clogGroupMemberLsn
Definition proc.h:306
pg_atomic_uint32 procArrayGroupNext
Definition proc.h:288
uint8 lwWaitMode
Definition proc.h:241
dlist_head lockGroupMembers
Definition proc.h:322
uint32 wait_event_info
Definition proc.h:296
dlist_head * procgloballist
Definition proc.h:182
Oid * fpRelId
Definition proc.h:312
BackendType backendType
Definition proc.h:231
uint8 statusFlags
Definition proc.h:259
TransactionId clogGroupMemberXid
Definition proc.h:301
Oid databaseId
Definition proc.h:225
int64 clogGroupMemberPage
Definition proc.h:304
bool clogGroupMember
Definition proc.h:299
uint64 * fpLockBits
Definition proc.h:311
pg_atomic_uint64 waitStart
Definition proc.h:254
bool fpVXIDLock
Definition proc.h:313
ProcNumber procNumber
Definition proc.h:213
int pid
Definition proc.h:200
XLogRecPtr waitLSN
Definition proc.h:269
dlist_node syncRepLinks
Definition proc.h:271
struct PGPROC::@131 vxid
int syncRepState
Definition proc.h:270
pg_atomic_uint32 clogGroupNext
Definition proc.h:300
dlist_node lockGroupLink
Definition proc.h:323
XidStatus clogGroupMemberXidStatus
Definition proc.h:302
int pgxactoff
Definition proc.h:202
XidCacheStatus subxidStatus
Definition proc.h:280
LOCK * waitLock
Definition proc.h:249
proclist_node lwWaitLink
Definition proc.h:242
TransactionId xid
Definition proc.h:190
LOCKMODE waitLockMode
Definition proc.h:251
struct XidCache subxids
Definition proc.h:282
int delayChkptFlags
Definition proc.h:257
PGPROC * lockGroupLeader
Definition proc.h:321
LocalTransactionId fpLocalTransactionId
Definition proc.h:314
TransactionId procArrayGroupMemberXid
Definition proc.h:294
LOCKMASK heldLocks
Definition proc.h:252
PGSemaphore sem
Definition proc.h:184
dlist_head myProcLocks[NUM_LOCK_PARTITIONS]
Definition proc.h:278
Oid roleId
Definition proc.h:226
ProcWaitStatus waitStatus
Definition proc.h:185
proclist_node cvWaitLink
Definition proc.h:245
Oid tempNamespaceId
Definition proc.h:228
dlist_node links
Definition proc.h:181
uint8 lwWaiting
Definition proc.h:240
Latch procLatch
Definition proc.h:187
uint8 * statusFlags
Definition proc.h:403
XidCacheStatus * subxidStates
Definition proc.h:397
dlist_head autovacFreeProcs
Definition proc.h:410
dlist_head freeProcs
Definition proc.h:408
ProcNumber checkpointerProc
Definition proc.h:425
int startupBufferPinWaitBufId
Definition proc.h:430
PGPROC * allProcs
Definition proc.h:388
pg_atomic_uint32 clogGroupFirst
Definition proc.h:418
int spins_per_delay
Definition proc.h:428
TransactionId * xids
Definition proc.h:391
dlist_head walsenderFreeProcs
Definition proc.h:414
dlist_head bgworkerFreeProcs
Definition proc.h:412
ProcNumber walwriterProc
Definition proc.h:424
pg_atomic_uint32 procArrayGroupFirst
Definition proc.h:416
uint32 allProcCount
Definition proc.h:406
bool overflowed
Definition proc.h:47
uint8 count
Definition proc.h:45
TransactionId xids[PGPROC_MAX_CACHED_SUBXIDS]
Definition proc.h:52
uint64 XLogRecPtr
Definition xlogdefs.h:21