PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
walsummary.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * walsummary.h
4 * WAL summary management
5 *
6 * Portions Copyright (c) 2010-2025, PostgreSQL Global Development Group
7 *
8 * src/include/backup/walsummary.h
9 *
10 *-------------------------------------------------------------------------
11 */
12#ifndef WALSUMMARY_H
13#define WALSUMMARY_H
14
15#include <time.h>
16
17#include "access/xlogdefs.h"
18#include "nodes/pg_list.h"
19#include "storage/fd.h"
20
21typedef struct WalSummaryIO
22{
24 off_t filepos;
26
27typedef struct WalSummaryFile
28{
33
34extern List *GetWalSummaries(TimeLineID tli, XLogRecPtr start_lsn,
35 XLogRecPtr end_lsn);
36extern List *FilterWalSummaries(List *wslist, TimeLineID tli,
37 XLogRecPtr start_lsn, XLogRecPtr end_lsn);
38extern bool WalSummariesAreComplete(List *wslist,
39 XLogRecPtr start_lsn, XLogRecPtr end_lsn,
40 XLogRecPtr *missing_lsn);
41extern File OpenWalSummaryFile(WalSummaryFile *ws, bool missing_ok);
43 time_t cutoff_time);
44
45extern int ReadWalSummary(void *wal_summary_io, void *data, int length);
46extern int WriteWalSummary(void *wal_summary_io, void *data, int length);
47extern void ReportWalSummaryError(void *callback_arg, char *fmt,...) pg_attribute_printf(2, 3);
48
49#endif /* WALSUMMARY_H */
#define pg_attribute_printf(f, a)
Definition: c.h:210
int File
Definition: fd.h:51
static void const char * fmt
const void * data
Definition: pg_list.h:54
XLogRecPtr end_lsn
Definition: walsummary.h:30
TimeLineID tli
Definition: walsummary.h:31
XLogRecPtr start_lsn
Definition: walsummary.h:29
off_t filepos
Definition: walsummary.h:24
void RemoveWalSummaryIfOlderThan(WalSummaryFile *ws, time_t cutoff_time)
Definition: walsummary.c:230
File OpenWalSummaryFile(WalSummaryFile *ws, bool missing_ok)
Definition: walsummary.c:205
bool WalSummariesAreComplete(List *wslist, XLogRecPtr start_lsn, XLogRecPtr end_lsn, XLogRecPtr *missing_lsn)
Definition: walsummary.c:138
struct WalSummaryIO WalSummaryIO
struct WalSummaryFile WalSummaryFile
int ReadWalSummary(void *wal_summary_io, void *data, int length)
Definition: walsummary.c:273
void ReportWalSummaryError(void *callback_arg, char *fmt,...) pg_attribute_printf(2
List * GetWalSummaries(TimeLineID tli, XLogRecPtr start_lsn, XLogRecPtr end_lsn)
Definition: walsummary.c:43
int WriteWalSummary(void *wal_summary_io, void *data, int length)
Definition: walsummary.c:294
List * FilterWalSummaries(List *wslist, TimeLineID tli, XLogRecPtr start_lsn, XLogRecPtr end_lsn)
Definition: walsummary.c:100
uint64 XLogRecPtr
Definition: xlogdefs.h:21
uint32 TimeLineID
Definition: xlogdefs.h:59