PostgreSQL Source Code
git master
|
Go to the source code of this file.
Functions | |
void | extractPageMap (const char *datadir, XLogRecPtr startpoint, int tliIndex, XLogRecPtr endpoint, const char *restoreCommand) |
void | findLastCheckpoint (const char *datadir, XLogRecPtr forkptr, int tliIndex, XLogRecPtr *lastchkptrec, TimeLineID *lastchkpttli, XLogRecPtr *lastchkptredo, const char *restoreCommand) |
XLogRecPtr | readOneRecord (const char *datadir, XLogRecPtr ptr, int tliIndex, const char *restoreCommand) |
void | progress_report (bool finished) |
TimeLineHistoryEntry * | rewind_parseTimeLineHistory (char *buffer, TimeLineID targetTLI, int *nentries) |
Variables | |
char * | datadir_target |
bool | showprogress |
bool | dry_run |
bool | do_sync |
int | WalSegSz |
DataDirSyncMethod | sync_method |
TimeLineHistoryEntry * | targetHistory |
int | targetNentries |
uint64 | fetch_size |
uint64 | fetch_done |
void extractPageMap | ( | const char * | datadir, |
XLogRecPtr | startpoint, | ||
int | tliIndex, | ||
XLogRecPtr | endpoint, | ||
const char * | restoreCommand | ||
) |
Definition at line 66 of file parsexlog.c.
References close, datadir, XLogReaderState::EndRecPtr, extractPageInfo(), LSN_FORMAT_ARGS, pg_fatal, SimpleXLogPageRead(), XLogPageReadPrivate::tliIndex, WalSegSz, XL_ROUTINE, XLogBeginRead(), xlogreader, XLogReaderAllocate(), XLogReaderFree(), xlogreadfd, and XLogReadRecord().
Referenced by main().
void findLastCheckpoint | ( | const char * | datadir, |
XLogRecPtr | forkptr, | ||
int | tliIndex, | ||
XLogRecPtr * | lastchkptrec, | ||
TimeLineID * | lastchkpttli, | ||
XLogRecPtr * | lastchkptredo, | ||
const char * | restoreCommand | ||
) |
Definition at line 168 of file parsexlog.c.
References close, datadir, keepwal_add_entry(), LSN_FORMAT_ARGS, MAXFNAMELEN, pg_fatal, CheckPoint::redo, XLogReaderState::seg, SimpleXLogPageRead(), SizeOfXLogLongPHD, SizeOfXLogShortPHD, snprintf, CheckPoint::ThisTimeLineID, WalSegSz, WALOpenSegment::ws_segno, WALOpenSegment::ws_tli, XLogRecord::xl_prev, XL_ROUTINE, XLOG_CHECKPOINT_ONLINE, XLOG_CHECKPOINT_SHUTDOWN, XLogBeginRead(), XLOGDIR, XLogFileName(), xlogreader, XLogReaderAllocate(), XLogReaderFree(), xlogreadfd, XLogReadRecord(), XLogRecGetData, XLogRecGetInfo, XLogRecGetRmid, XLogSegmentOffset, and XLR_INFO_MASK.
Referenced by main().
void progress_report | ( | bool | finished | ) |
Definition at line 791 of file pg_rewind.c.
References _, fetch_done, fetch_size, fprintf, last_progress_report, now(), showprogress, snprintf, and UINT64_FORMAT.
Referenced by perform_rewind().
XLogRecPtr readOneRecord | ( | const char * | datadir, |
XLogRecPtr | ptr, | ||
int | tliIndex, | ||
const char * | restoreCommand | ||
) |
Definition at line 124 of file parsexlog.c.
References close, datadir, XLogReaderState::EndRecPtr, LSN_FORMAT_ARGS, pg_fatal, SimpleXLogPageRead(), XLogPageReadPrivate::tliIndex, WalSegSz, XL_ROUTINE, XLogBeginRead(), xlogreader, XLogReaderAllocate(), XLogReaderFree(), xlogreadfd, and XLogReadRecord().
Referenced by main().
TimeLineHistoryEntry* rewind_parseTimeLineHistory | ( | char * | buffer, |
TimeLineID | targetTLI, | ||
int * | nentries | ||
) |
Definition at line 28 of file timeline.c.
References TimeLineHistoryEntry::begin, TimeLineHistoryEntry::end, exit(), InvalidXLogRecPtr, pg_log_error, pg_log_error_detail, pg_malloc(), pg_realloc(), and TimeLineHistoryEntry::tli.
Referenced by getTimelineHistory().
|
extern |
Definition at line 67 of file pg_rewind.c.
Referenced by create_target_dir(), create_target_symlink(), ensureCleanShutdown(), getRestoreCommand(), getTimelineHistory(), main(), open_target_file(), perform_rewind(), remove_target_dir(), remove_target_file(), remove_target_symlink(), sync_target_dir(), and truncate_target_file().
|
extern |
Definition at line 76 of file pg_rewind.c.
Referenced by main(), and perform_rewind().
|
extern |
Definition at line 75 of file pg_rewind.c.
Referenced by ensureCleanShutdown(), main(), and perform_rewind().
|
extern |
Definition at line 86 of file pg_rewind.c.
Referenced by main(), progress_report(), and write_target_range().
|
extern |
Definition at line 85 of file pg_rewind.c.
Referenced by main(), postgresAcquireSampleRowsFunc(), and progress_report().
|
extern |
Definition at line 74 of file pg_rewind.c.
Referenced by main(), perform_rewind(), and progress_report().
|
extern |
Definition at line 78 of file pg_rewind.c.
Referenced by main().
|
extern |
Definition at line 81 of file pg_rewind.c.
Referenced by main(), and SimpleXLogPageRead().
|
extern |
Definition at line 82 of file pg_rewind.c.
Referenced by main(), and SimpleXLogPageRead().
|
extern |
Definition at line 32 of file streamutil.c.
Referenced by close_walfile(), createBackupLabel(), digestControlFile(), extractPageMap(), findLastCheckpoint(), FindStreamingStart(), main(), open_walfile(), ProcessXLogDataMsg(), readOneRecord(), ReceiveXlogStream(), RetrieveWalSegSize(), SimpleXLogPageRead(), StartLogStreamer(), and StreamLog().