PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
xlogstats.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * xlogstats.h
4 * Definitions for WAL Statitstics
5 *
6 * Copyright (c) 2022-2025, 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
21typedef struct XLogRecStats
22{
27
28typedef struct XLogStats
29{
31#ifdef FRONTEND
32 XLogRecPtr startptr;
33 XLogRecPtr endptr;
34#endif
38
39extern void XLogRecGetLen(XLogReaderState *record, uint32 *rec_len,
40 uint32 *fpi_len);
41extern void XLogRecStoreStats(XLogStats *stats, XLogReaderState *record);
42
43#endif /* XLOGSTATS_H */
uint64_t uint64
Definition: c.h:486
uint32_t uint32
Definition: c.h:485
#define RM_MAX_ID
Definition: rmgr.h:33
uint64 count
Definition: xlogstats.h:23
uint64 fpi_len
Definition: xlogstats.h:25
uint64 rec_len
Definition: xlogstats.h:24
XLogRecStats record_stats[RM_MAX_ID+1][MAX_XLINFO_TYPES]
Definition: xlogstats.h:36
uint64 count
Definition: xlogstats.h:30
XLogRecStats rmgr_stats[RM_MAX_ID+1]
Definition: xlogstats.h:35
uint64 XLogRecPtr
Definition: xlogdefs.h:21
void XLogRecStoreStats(XLogStats *stats, XLogReaderState *record)
Definition: xlogstats.c:54
struct XLogStats XLogStats
void XLogRecGetLen(XLogReaderState *record, uint32 *rec_len, uint32 *fpi_len)
Definition: xlogstats.c:22
struct XLogRecStats XLogRecStats
#define MAX_XLINFO_TYPES
Definition: xlogstats.h:19