1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-25 12:03:53 +03:00

Rename PGPROC->vacuumFlags to statusFlags

With more flags associated to a PGPROC entry that are not related to
vacuum (currently existing or planned), the name "statusFlags" describes
its purpose better.

(The same is done to the mirroring PROC_HDR->vacuumFlags.)

No functional changes in this commit.

This was suggested first by Hari Babu Kommi in [1] and then by Michael
Paquier at [2].

[1] https://postgr.es/m/CAJrrPGcsDC-oy1AhqH0JkXYa0Z2AgbuXzHPpByLoBGMxfOZMEQ@mail.gmail.com
[2] https://postgr.es/m/20200820060929.GB3730@paquier.xyz

Author: Dmitry Dolgov <9erthalion6@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/20201116182446.qcg3o6szo2zookyr@localhost
This commit is contained in:
Alvaro Herrera
2020-11-16 19:42:55 -03:00
parent 4025e6c466
commit cd9c1b3e19
9 changed files with 57 additions and 56 deletions

View File

@@ -49,7 +49,7 @@ struct XidCache
};
/*
* Flags for ProcGlobal->vacuumFlags[]
* Flags for PGPROC->statusFlags and PROC_HDR->statusFlags[]
*/
#define PROC_IS_AUTOVACUUM 0x01 /* is it an autovac worker? */
#define PROC_IN_VACUUM 0x02 /* currently running lazy vacuum */
@@ -175,9 +175,10 @@ struct PGPROC
bool delayChkpt; /* true if this proc delays checkpoint start */
uint8 vacuumFlags; /* this backend's vacuum flags, see PROC_*
uint8 statusFlags; /* this backend's status flags, see PROC_*
* above. mirrored in
* ProcGlobal->vacuumFlags[pgxactoff] */
* ProcGlobal->statusFlags[pgxactoff] */
/*
* Info to allow us to wait for synchronous replication, if needed.
* waitLSN is InvalidXLogRecPtr if not waiting; set only by user backend.
@@ -273,7 +274,7 @@ extern PGDLLIMPORT PGPROC *MyProc;
* allow for as tight loops accessing the data as possible. Second, to prevent
* updates of frequently changing data (e.g. xmin) from invalidating
* cachelines also containing less frequently changing data (e.g. xid,
* vacuumFlags). Third to condense frequently accessed data into as few
* statusFlags). Third to condense frequently accessed data into as few
* cachelines as possible.
*
* There are two main reasons to have the data mirrored between these dense
@@ -315,10 +316,10 @@ typedef struct PROC_HDR
XidCacheStatus *subxidStates;
/*
* Array mirroring PGPROC.vacuumFlags for each PGPROC currently in the
* Array mirroring PGPROC.statusFlags for each PGPROC currently in the
* procarray.
*/
uint8 *vacuumFlags;
uint8 *statusFlags;
/* Length of allProcs array */
uint32 allProcCount;