PostgreSQL Source Code: src/bin/pg_basebackup/walmethods.h File Reference (original) (raw)
Go to the source code of this file.
Data Structures | |
---|---|
struct | Walfile |
struct | WalWriteMethodOps |
struct | WalWriteMethod |
Functions | |
---|---|
WalWriteMethod * | CreateWalDirectoryMethod (const char *basedir, pg_compress_algorithm compression_algorithm, int compression_level, bool sync) |
WalWriteMethod * | CreateWalTarMethod (const char *tarbase, pg_compress_algorithm compression_algorithm, int compression_level, bool sync) |
const char * | GetLastWalMethodError (WalWriteMethod *wwmethod) |
◆ WalWriteMethod
◆ WalWriteMethodOps
◆ WalCloseMethod
Enumerator |
---|
CLOSE_NORMAL |
CLOSE_UNLINK |
CLOSE_NO_RENAME |
Definition at line 31 of file walmethods.h.
◆ CreateWalDirectoryMethod()
Definition at line 640 of file walmethods.c.
643{
645
654
655 return &wwmethod->base;
656}
char * pg_strdup(const char *in)
void * pg_malloc0(size_t size)
static pg_compress_algorithm compression_algorithm
const WalWriteMethodOps * ops
pg_compress_algorithm compression_algorithm
#define clear_error(wwmethod)
static const WalWriteMethodOps WalDirectoryMethodOps
References DirectoryMethodData::base, basedir, DirectoryMethodData::basedir, clear_error, compression_algorithm, WalWriteMethod::compression_algorithm, WalWriteMethod::compression_level, WalWriteMethod::ops, pg_malloc0(), pg_strdup(), WalWriteMethod::sync, and WalDirectoryMethodOps.
Referenced by LogStreamerMain(), and StreamLog().
◆ CreateWalTarMethod()
Definition at line 1355 of file walmethods.c.
1358{
1361 ".tar.gz" : ".tar";
1362
1370
1373 wwmethod->fd = -1;
1374#ifdef HAVE_LIBZ
1377#endif
1378
1379 return &wwmethod->base;
1380}
void * pg_malloc(size_t size)
static const WalWriteMethodOps WalTarMethodOps
References TarMethodData::base, clear_error, compression_algorithm, WalWriteMethod::compression_algorithm, WalWriteMethod::compression_level, TarMethodData::fd, WalWriteMethod::ops, PG_COMPRESSION_GZIP, pg_malloc(), pg_malloc0(), sprintf, WalWriteMethod::sync, TarMethodData::tarfilename, WalTarMethodOps, and ZLIB_OUT_SIZE.
Referenced by LogStreamerMain().
◆ GetLastWalMethodError()
Definition at line 1383 of file walmethods.c.
1384{
1388}
const char * lasterrstring
References WalWriteMethod::lasterrno, WalWriteMethod::lasterrstring, and strerror.
Referenced by close_walfile(), HandleCopyStream(), mark_file_as_archived(), open_walfile(), ProcessKeepaliveMsg(), ProcessXLogDataMsg(), ReceiveXlogStream(), tar_close(), and writeTimeLineHistoryFile().