mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
Update comments that became out-of-date with the PGXACT struct.
When the "hot" members of PGPROC were split off to separate PGXACT structs, many PGPROC fields referred to in comments were moved to PGXACT, but the comments were neglected in the commit. Mostly this is just a search/replace of PGPROC with PGXACT, but the way the dummy PGPROC entries are created for prepared transactions changed more, making some of the comments totally bogus. Noah Misch
This commit is contained in:
@@ -56,7 +56,7 @@ int DeadlockTimeout = 1000;
|
||||
int StatementTimeout = 0;
|
||||
bool log_lock_waits = false;
|
||||
|
||||
/* Pointer to this process's PGPROC struct, if any */
|
||||
/* Pointer to this process's PGPROC and PGXACT structs, if any */
|
||||
PGPROC *MyProc = NULL;
|
||||
PGXACT *MyPgXact = NULL;
|
||||
|
||||
@@ -190,15 +190,11 @@ InitProcGlobal(void)
|
||||
ProcGlobal->checkpointerLatch = NULL;
|
||||
|
||||
/*
|
||||
* Create and initialize all the PGPROC structures we'll need (except for
|
||||
* those used for 2PC, which are embedded within a GlobalTransactionData
|
||||
* struct).
|
||||
*
|
||||
* There are four separate consumers of PGPROC structures: (1) normal
|
||||
* backends, (2) autovacuum workers and the autovacuum launcher, (3)
|
||||
* auxiliary processes, and (4) prepared transactions. Each PGPROC
|
||||
* structure is dedicated to exactly one of these purposes, and they do
|
||||
* not move between groups.
|
||||
* Create and initialize all the PGPROC structures we'll need. There are
|
||||
* four separate consumers: (1) normal backends, (2) autovacuum workers
|
||||
* and the autovacuum launcher, (3) auxiliary processes, and (4) prepared
|
||||
* transactions. Each PGPROC structure is dedicated to exactly one of
|
||||
* these purposes, and they do not move between groups.
|
||||
*/
|
||||
procs = (PGPROC *) ShmemAlloc(TotalProcs * sizeof(PGPROC));
|
||||
ProcGlobal->allProcs = procs;
|
||||
@@ -214,7 +210,7 @@ InitProcGlobal(void)
|
||||
* from the main PGPROC array so that the most heavily accessed data is
|
||||
* stored contiguously in memory in as few cache lines as possible. This
|
||||
* provides significant performance benefits, especially on a
|
||||
* multiprocessor system. Thereis one PGXACT structure for every PGPROC
|
||||
* multiprocessor system. There is one PGXACT structure for every PGPROC
|
||||
* structure.
|
||||
*/
|
||||
pgxacts = (PGXACT *) ShmemAlloc(TotalProcs * sizeof(PGXACT));
|
||||
|
||||
Reference in New Issue
Block a user