Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit997afad

Browse files
committed
pgstat: introduce PgStat_Kind enum.
Will be used by following commits to generalize stats infrastructure. Keptseparate to allow commits stand reasonably on their own.Reviewed-By: Kyotaro Horiguchi <horikyota.ntt@gmail.com>Discussion:https://postgr.es/m/20220404041516.cctrvpadhuriawlq@alap3.anarazel.de
1 parent0d5c387 commit997afad

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

‎src/include/pgstat.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,30 @@
3333
/* Default directory to store temporary statistics data in */
3434
#definePG_STAT_TMP_DIR"pg_stat_tmp"
3535

36+
/* The types of statistics entries */
37+
typedefenumPgStat_Kind
38+
{
39+
/* use 0 for INVALID, to catch zero-initialized data */
40+
PGSTAT_KIND_INVALID=0,
41+
42+
/* stats for variable-numbered objects */
43+
PGSTAT_KIND_DATABASE,/* database-wide statistics */
44+
PGSTAT_KIND_RELATION,/* per-table statistics */
45+
PGSTAT_KIND_FUNCTION,/* per-function statistics */
46+
PGSTAT_KIND_REPLSLOT,/* per-slot statistics */
47+
PGSTAT_KIND_SUBSCRIPTION,/* per-subscription statistics */
48+
49+
/* stats for fixed-numbered objects */
50+
PGSTAT_KIND_ARCHIVER,
51+
PGSTAT_KIND_BGWRITER,
52+
PGSTAT_KIND_CHECKPOINTER,
53+
PGSTAT_KIND_SLRU,
54+
PGSTAT_KIND_WAL,
55+
}PgStat_Kind;
56+
57+
#definePGSTAT_KIND_FIRST_VALID PGSTAT_KIND_DATABASE
58+
#definePGSTAT_KIND_LAST PGSTAT_KIND_WAL
59+
#definePGSTAT_NUM_KINDS (PGSTAT_KIND_LAST + 1)
3660

3761
/* Values for track_functions GUC variable --- order is significant! */
3862
typedefenumTrackFunctionsLevel

‎src/tools/pgindent/typedefs.list

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1942,6 +1942,7 @@ PgStat_FunctionCallUsage
19421942
PgStat_FunctionCounts
19431943
PgStat_FunctionEntry
19441944
PgStat_GlobalStats
1945+
PgStat_Kind
19451946
PgStat_Msg
19461947
PgStat_MsgAnalyze
19471948
PgStat_MsgAnlAncestors

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp