PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | WalSummaryIO |
struct | WalSummaryFile |
Typedefs | |
typedef struct WalSummaryIO | WalSummaryIO |
typedef struct WalSummaryFile | WalSummaryFile |
Functions | |
List * | GetWalSummaries (TimeLineID tli, XLogRecPtr start_lsn, XLogRecPtr end_lsn) |
List * | FilterWalSummaries (List *wslist, TimeLineID tli, XLogRecPtr start_lsn, XLogRecPtr end_lsn) |
bool | WalSummariesAreComplete (List *wslist, XLogRecPtr start_lsn, XLogRecPtr end_lsn, XLogRecPtr *missing_lsn) |
File | OpenWalSummaryFile (WalSummaryFile *ws, bool missing_ok) |
void | RemoveWalSummaryIfOlderThan (WalSummaryFile *ws, time_t cutoff_time) |
int | ReadWalSummary (void *wal_summary_io, void *data, int length) |
int | WriteWalSummary (void *wal_summary_io, void *data, int length) |
void | ReportWalSummaryError (void *callback_arg, char *fmt,...) pg_attribute_printf(2 |
typedef struct WalSummaryFile WalSummaryFile |
typedef struct WalSummaryIO WalSummaryIO |
List* FilterWalSummaries | ( | List * | wslist, |
TimeLineID | tli, | ||
XLogRecPtr | start_lsn, | ||
XLogRecPtr | end_lsn | ||
) |
Definition at line 100 of file walsummary.c.
References WalSummaryFile::end_lsn, lappend(), lfirst, NIL, WalSummaryFile::tli, and XLogRecPtrIsInvalid.
Referenced by PrepareForIncrementalBackup().
List* GetWalSummaries | ( | TimeLineID | tli, |
XLogRecPtr | start_lsn, | ||
XLogRecPtr | end_lsn | ||
) |
Definition at line 43 of file walsummary.c.
References AllocateDir(), dirent::d_name, WalSummaryFile::end_lsn, FreeDir(), IsWalSummaryFilename(), lappend(), NIL, palloc(), ReadDir(), WalSummaryFile::start_lsn, WalSummaryFile::tli, XLOGDIR, and XLogRecPtrIsInvalid.
Referenced by GetOldestUnsummarizedLSN(), MaybeRemoveOldWalSummaries(), pg_available_wal_summaries(), and PrepareForIncrementalBackup().
File OpenWalSummaryFile | ( | WalSummaryFile * | ws, |
bool | missing_ok | ||
) |
Definition at line 205 of file walsummary.c.
References WalSummaryFile::end_lsn, ereport, errcode_for_file_access(), errmsg(), ERROR, LSN_FORMAT_ARGS, MAXPGPATH, PathNameOpenFile(), snprintf, WalSummaryFile::start_lsn, WalSummaryFile::tli, and XLOGDIR.
Referenced by pg_wal_summary_contents(), and PrepareForIncrementalBackup().
int ReadWalSummary | ( | void * | wal_summary_io, |
void * | data, | ||
int | length | ||
) |
Definition at line 273 of file walsummary.c.
References data, ereport, errcode_for_file_access(), errmsg(), ERROR, WalSummaryIO::file, FilePathName(), WalSummaryIO::filepos, and FileRead().
Referenced by pg_wal_summary_contents(), and PrepareForIncrementalBackup().
void RemoveWalSummaryIfOlderThan | ( | WalSummaryFile * | ws, |
time_t | cutoff_time | ||
) |
Definition at line 230 of file walsummary.c.
References DEBUG2, WalSummaryFile::end_lsn, ereport, errcode_for_file_access(), errmsg(), errmsg_internal(), ERROR, LSN_FORMAT_ARGS, lstat, MAXPGPATH, snprintf, stat::st_mtime, WalSummaryFile::start_lsn, WalSummaryFile::tli, and XLOGDIR.
Referenced by MaybeRemoveOldWalSummaries().
void ReportWalSummaryError | ( | void * | callback_arg, |
char * | fmt, | ||
... | |||
) |
bool WalSummariesAreComplete | ( | List * | wslist, |
XLogRecPtr | start_lsn, | ||
XLogRecPtr | end_lsn, | ||
XLogRecPtr * | missing_lsn | ||
) |
Definition at line 138 of file walsummary.c.
References WalSummaryFile::end_lsn, InvalidXLogRecPtr, lfirst, list_copy(), list_sort(), ListComparatorForWalSummaryFiles(), NIL, and WalSummaryFile::start_lsn.
Referenced by PrepareForIncrementalBackup().
int WriteWalSummary | ( | void * | wal_summary_io, |
void * | data, | ||
int | length | ||
) |
Definition at line 294 of file walsummary.c.
References data, ereport, errcode_for_file_access(), errhint(), errmsg(), ERROR, WalSummaryIO::file, FilePathName(), WalSummaryIO::filepos, and FileWrite().
Referenced by SummarizeWAL().