PostgreSQL Source Code
git master
Loading...
Searching...
No Matches
xlogstats.h
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* xlogstats.h
4
* Definitions for WAL Statistics
5
*
6
* Copyright (c) 2022-2026, PostgreSQL Global Development Group
7
*
8
* IDENTIFICATION
9
* src/include/access/xlogstats.h
10
*
11
*-------------------------------------------------------------------------
12
*/
13
#ifndef XLOGSTATS_H
14
#define XLOGSTATS_H
15
16
#include "
access/rmgr.h
"
17
#include "
access/xlogreader.h
"
18
19
#define MAX_XLINFO_TYPES 16
20
21
typedef
struct
XLogRecStats
22
{
23
uint64
count
;
24
uint64
rec_len
;
25
uint64
fpi_len
;
26
}
XLogRecStats
;
27
28
typedef
struct
XLogStats
29
{
30
uint64
count
;
31
#ifdef FRONTEND
32
XLogRecPtr
startptr;
33
XLogRecPtr
endptr;
34
#endif
35
XLogRecStats
rmgr_stats
[
RM_MAX_ID
+ 1];
36
XLogRecStats
record_stats
[
RM_MAX_ID
+ 1][
MAX_XLINFO_TYPES
];
37
}
XLogStats
;
38
39
extern
void
XLogRecGetLen
(
XLogReaderState
*record,
uint32
*rec_len,
40
uint32
*fpi_len);
41
extern
void
XLogRecStoreStats
(
XLogStats
*stats,
XLogReaderState
*record);
42
43
#endif
/* XLOGSTATS_H */
uint64
uint64_t uint64
Definition
c.h:547
uint32
uint32_t uint32
Definition
c.h:546
rmgr.h
RM_MAX_ID
#define RM_MAX_ID
Definition
rmgr.h:33
XLogReaderState
Definition
xlogreader.h:175
XLogRecStats
Definition
xlogstats.h:22
XLogRecStats::count
uint64 count
Definition
xlogstats.h:23
XLogRecStats::fpi_len
uint64 fpi_len
Definition
xlogstats.h:25
XLogRecStats::rec_len
uint64 rec_len
Definition
xlogstats.h:24
XLogStats
Definition
xlogstats.h:29
XLogStats::record_stats
XLogRecStats record_stats[RM_MAX_ID+1][MAX_XLINFO_TYPES]
Definition
xlogstats.h:36
XLogStats::count
uint64 count
Definition
xlogstats.h:30
XLogStats::rmgr_stats
XLogRecStats rmgr_stats[RM_MAX_ID+1]
Definition
xlogstats.h:35
XLogRecPtr
uint64 XLogRecPtr
Definition
xlogdefs.h:21
xlogreader.h
XLogRecStoreStats
void XLogRecStoreStats(XLogStats *stats, XLogReaderState *record)
Definition
xlogstats.c:54
XLogRecGetLen
void XLogRecGetLen(XLogReaderState *record, uint32 *rec_len, uint32 *fpi_len)
Definition
xlogstats.c:22
MAX_XLINFO_TYPES
#define MAX_XLINFO_TYPES
Definition
xlogstats.h:19
src
include
access
xlogstats.h
Generated on Mon Feb 2 2026 06:13:16 for PostgreSQL Source Code by
1.9.8