errno = save_errno;
ereport(ERROR,
(errcode_for_file_access(),
- errmsg("could not write to file \"%s\" : %m",
+ errmsg("could not write to file \"%s\": %m",
transient_dump_file_path)));
}
errno = save_errno;
ereport(ERROR,
(errcode_for_file_access(),
- errmsg("could not write to file \"%s\" : %m",
+ errmsg("could not write to file \"%s\": %m",
transient_dump_file_path)));
}
}
errno = save_errno;
ereport(ERROR,
(errcode_for_file_access(),
- errmsg("could not close file \"%s\" : %m",
+ errmsg("could not close file \"%s\": %m",
transient_dump_file_path)));
}
if (lstat(XLOG_CONTROL_FILE, &statbuf) != 0)
ereport(ERROR,
(errcode_for_file_access(),
- errmsg("could not stat control file \"%s\": %m",
+ errmsg("could not stat file \"%s\": %m",
XLOG_CONTROL_FILE)));
sendFile(XLOG_CONTROL_FILE, XLOG_CONTROL_FILE, &statbuf, false);
}
*/
if (!rmtree(tmppath, true))
ereport(WARNING,
- (errcode_for_file_access(),
- errmsg("could not remove directory \"%s\"", tmppath)));
+ (errmsg("could not remove directory \"%s\"", tmppath)));
/*
* We release this at the very end, so that nobody starts trying to create
if (!rmtree(path, true))
{
ereport(WARNING,
- (errcode_for_file_access(),
- errmsg("could not remove directory \"%s\"", path)));
+ (errmsg("could not remove directory \"%s\"",
+ path)));
continue;
}
fsync_fname("pg_replslot", true);
/* verify magic */
if (cp.magic != SLOT_MAGIC)
ereport(PANIC,
- (errcode_for_file_access(),
+ (errcode(ERRCODE_DATA_CORRUPTED),
errmsg("replication slot file \"%s\" has wrong magic number: %u instead of %u",
path, cp.magic, SLOT_MAGIC)));
/* verify version */
if (cp.version != SLOT_VERSION)
ereport(PANIC,
- (errcode_for_file_access(),
+ (errcode(ERRCODE_DATA_CORRUPTED),
errmsg("replication slot file \"%s\" has unsupported version %u",
path, cp.version)));
/* boundary check on length */
if (cp.length != ReplicationSlotOnDiskV2Size)
ereport(PANIC,
- (errcode_for_file_access(),
+ (errcode(ERRCODE_DATA_CORRUPTED),
errmsg("replication slot file \"%s\" has corrupted length %u",
path, cp.length)));
if (!rmtree(slotdir, true))
{
ereport(WARNING,
- (errcode_for_file_access(),
- errmsg("could not remove directory \"%s\"", slotdir)));
+ (errmsg("could not remove directory \"%s\"",
+ slotdir)));
}
fsync_fname("pg_replslot", true);
return;