Definition at line 1694 of file snapbuild.c.
1705 if (missing_ok && errno == ENOENT)
1710 errmsg(
"could not open file \"%s\": %m", path)));
1730 errmsg(
"snapbuild state file \"%s\" has wrong magic number: %u instead of %u",
1736 errmsg(
"snapbuild state file \"%s\" has unsupported version: %u instead of %u",
1769 errmsg(
"could not close file \"%s\": %m", path)));
1777 errmsg(
"checksum mismatch for snapbuild state file \"%s\": is %u, should be %u",
1778 path, checksum, ondisk->
checksum)));
int errcode_for_file_access(void)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
int CloseTransientFile(int fd)
void fsync_fname(const char *fname, bool isdir)
int OpenTransientFile(const char *fileName, int fileFlags)
void * MemoryContextAllocZero(MemoryContext context, Size size)
#define ERRCODE_DATA_CORRUPTED
#define COMP_CRC32C(crc, data, len)
#define EQ_CRC32C(c1, c2)
static int fd(const char *x, int i)
#define PG_LOGICAL_SNAPSHOTS_DIR
#define SNAPBUILD_VERSION
#define SnapBuildOnDiskNotChecksummedSize
#define SnapBuildOnDiskConstantSize
static void SnapBuildRestoreContents(int fd, char *dest, Size size, const char *path)
struct SnapBuild::@116 catchange
struct SnapBuild::@115 committed
References SnapBuildOnDisk::builder, SnapBuild::catchange, SnapBuildOnDisk::checksum, CloseTransientFile(), SnapBuild::committed, COMP_CRC32C, context, EQ_CRC32C, ereport, errcode(), ERRCODE_DATA_CORRUPTED, errcode_for_file_access(), errmsg(), ERROR, fd(), FIN_CRC32C, fsync_fname(), INIT_CRC32C, SnapBuildOnDisk::magic, MemoryContextAllocZero(), OpenTransientFile(), PG_BINARY, PG_LOGICAL_SNAPSHOTS_DIR, SNAPBUILD_MAGIC, SNAPBUILD_VERSION, SnapBuildOnDiskConstantSize, SnapBuildOnDiskNotChecksummedSize, SnapBuildRestoreContents(), SnapBuildOnDisk::version, SnapBuild::xcnt, and SnapBuild::xip.
Referenced by pg_get_logical_snapshot_info(), pg_get_logical_snapshot_meta(), and SnapBuildRestore().