|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <dirent.h>#include <limits.h>#include <signal.h>#include <sys/stat.h>#include <unistd.h>#include "access/transam.h"#include "access/xlog_internal.h"#include "access/xlogreader.h"#include "access/xlogrecord.h"#include "access/xlogstats.h"#include "common/fe_memutils.h"#include "common/file_perm.h"#include "common/file_utils.h"#include "common/logging.h"#include "common/relpath.h"#include "getopt_long.h"#include "rmgrdesc.h"#include "storage/bufpage.h"
Go to the source code of this file.
Data Structures | |
| struct | XLogDumpPrivate |
| struct | XLogDumpConfig |
Macros | |
| #define | FRONTEND 1 |
Typedefs | |
| typedef struct XLogDumpPrivate | XLogDumpPrivate |
| typedef struct XLogDumpConfig | XLogDumpConfig |
Variables | |
| static const char * | progname |
| static volatile sig_atomic_t | time_to_stop = false |
| static const RelFileLocator | emptyRelFileLocator = {0, 0, 0} |
| #define FRONTEND 1 |
Definition at line 12 of file pg_waldump.c.
Definition at line 127 of file pg_waldump.c.
References pg_check_dir(), pg_dir_create_mode, pg_fatal, and pg_mkdir_p().
Referenced by main().
Definition at line 292 of file pg_waldump.c.
References datadir, directory, fb(), MAXPGPATH, pg_fatal, pg_strdup(), search_directory(), snprintf, WalSegSz, and XLOGDIR.
Referenced by main().
Definition at line 792 of file pg_waldump.c.
References XLogDumpConfig::already_displayed_records, XLogDumpConfig::bkp_details, BlockNumberIsValid(), close, create_fullpage_directory(), RelFileLocator::dbOid, directory, emptyRelFileLocator, EXIT_FAILURE, EXIT_SUCCESS, fb(), fd(), XLogDumpConfig::filter_by_extended, XLogDumpConfig::filter_by_fpw, XLogDumpConfig::filter_by_relation, XLogDumpConfig::filter_by_relation_block, XLogDumpConfig::filter_by_relation_block_enabled, XLogDumpConfig::filter_by_relation_enabled, XLogDumpConfig::filter_by_relation_forknum, XLogDumpConfig::filter_by_rmgr, XLogDumpConfig::filter_by_rmgr_enabled, XLogDumpConfig::filter_by_xid, XLogDumpConfig::filter_by_xid_enabled, XLogDumpConfig::follow, forkname_to_number(), get_progname(), getopt_long(), GetRmgrDesc(), identify_target_directory(), InvalidBlockNumber, InvalidForkNumber, InvalidTransactionId, InvalidXLogRecPtr, LSN_FORMAT_ARGS, ngettext, no_argument, OidIsValid, open_file_in_directory(), optarg, optind, optional_argument, pg_fatal, pg_log_error, pg_log_error_detail, pg_log_error_hint, pg_log_info, pg_logging_init(), pg_strcasecmp(), pg_strdup(), PG_TEXTDOMAIN, pg_usleep(), pqsignal, print_rmgr_list(), progname, XLogDumpConfig::quiet, RelFileNumberIsValid, RelFileLocator::relNumber, required_argument, RM_MAX_BUILTIN_ID, RmgrIdIsCustom(), XLogDumpConfig::save_fullpage_path, set_pglocale_pgservice(), sigint_handler(), RelFileLocator::spcOid, split_path(), XLogDumpConfig::stats, XLogDumpConfig::stats_per_record, XLogDumpConfig::stop_after_records, time_to_stop, usage(), val, verify_directory(), WALDumpCloseSegment(), WALDumpOpenSegment(), WALDumpReadPage(), WalSegSz, XLogRecord::xl_rmid, XL_ROUTINE, XLogRecord::xl_xid, XLByteInSeg, XLogDumpDisplayRecord(), XLogDumpDisplayStats(), XLogFindNextRecord(), XLogFromFileName(), XLogReaderAllocate(), XLogReaderFree(), XLogReadRecord(), XLogRecordHasFPW(), XLogRecordMatchesRelationBlock(), XLogRecordSaveFPWs(), XLogRecPtrIsValid, XLogRecStoreStats(), XLogSegmentOffset, and XLogSegNoOffsetToRecPtr.
Definition at line 187 of file pg_waldump.c.
References Assert, directory, fb(), fd(), MAXPGPATH, PG_BINARY, pg_fatal, and snprintf.
Referenced by main(), search_directory(), and WALDumpOpenSegment().
Definition at line 97 of file pg_waldump.c.
References GetRmgrDesc(), i, printf, and RM_MAX_BUILTIN_ID.
Referenced by main().
Definition at line 209 of file pg_waldump.c.
References buf, close, closedir(), directory, fb(), fd(), IsValidWalSegSize, IsXLogFileName(), ngettext, open_file_in_directory(), opendir(), pg_fatal, pg_log_error, pg_log_error_detail, pg_strdup(), read, readdir(), and WalSegSz.
Referenced by identify_target_directory().
|
static |
Definition at line 160 of file pg_waldump.c.
References fb(), pg_strdup(), and pnstrdup().
Referenced by main().
Definition at line 756 of file pg_waldump.c.
References _, fb(), printf, and progname.
Referenced by main().
|
static |
Definition at line 380 of file pg_waldump.c.
References close.
Referenced by main().
|
static |
Definition at line 338 of file pg_waldump.c.
References fb(), MAXPGPATH, open_file_in_directory(), pg_fatal, pg_usleep(), and XLogFileName().
Referenced by main().
|
static |
Definition at line 389 of file pg_waldump.c.
References fb(), MAXPGPATH, pg_fatal, WALRead(), WALOpenSegment::ws_segno, WALOpenSegment::ws_tli, XLogFileName(), and XLogRecPtrIsValid.
Referenced by main().
|
static |
Definition at line 546 of file pg_waldump.c.
References XLogDumpConfig::bkp_details, StringInfoData::data, fb(), GetRmgrDesc(), initStringInfo(), LSN_FORMAT_ARGS, pfree(), printf, XLogReaderState::ReadRecPtr, resetStringInfo(), RmgrDescData::rm_desc, RmgrDescData::rm_identify, RmgrDescData::rm_name, XLogRecGetBlockRefInfo(), XLogRecGetInfo, XLogRecGetLen(), XLogRecGetPrev, XLogRecGetRmid, XLogRecGetTotalLen, XLogRecGetXid, and XLR_INFO_MASK.
Referenced by main().
|
static |
Definition at line 626 of file pg_waldump.c.
References XLogRecStats::count, XLogStats::count, fb(), XLogRecStats::fpi_len, GetRmgrDesc(), LSN_FORMAT_ARGS, MAX_XLINFO_TYPES, printf, psprintf(), XLogRecStats::rec_len, XLogStats::record_stats, RmgrDescData::rm_identify, RM_MAX_ID, RmgrDescData::rm_name, XLogStats::rmgr_stats, RmgrIdIsCustom(), RmgrIdIsValid, XLogDumpConfig::stats_per_record, XLogDumpStatsRow(), and XLogRecPtrIsValid.
Referenced by main().
|
static |
Definition at line 585 of file pg_waldump.c.
References fb(), name, and printf.
Referenced by XLogDumpDisplayStats().
|
static |
Definition at line 469 of file pg_waldump.c.
References fb(), XLogRecHasBlockImage, XLogRecHasBlockRef, and XLogRecMaxBlockId.
Referenced by main().
|
static |
Definition at line 438 of file pg_waldump.c.
References emptyRelFileLocator, fb(), InvalidBlockNumber, InvalidForkNumber, RelFileLocatorEquals, XLogRecGetBlockTagExtended(), and XLogRecMaxBlockId.
Referenced by main().
|
static |
Definition at line 490 of file pg_waldump.c.
References buf, XLogReaderState::errormsg_buf, fb(), filename, FORKNAMECHARS, forkNames, LSN_FORMAT_ARGS, MAX_FORKNUM, MAXPGPATH, PG_BINARY_W, pg_fatal, XLogReaderState::ReadRecPtr, RestoreBlockImage(), XLogReaderState::seg, snprintf, sprintf, WALOpenSegment::ws_tli, XLogRecGetBlockTagExtended(), XLogRecHasBlockImage, XLogRecHasBlockRef, and XLogRecMaxBlockId.
Referenced by main().
|
static |
Definition at line 44 of file pg_waldump.c.
Referenced by main(), and XLogRecordMatchesRelationBlock().
Definition at line 40 of file pg_waldump.c.
|
static |
Definition at line 42 of file pg_waldump.c.
Referenced by main(), and sigint_handler().