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