42 const char *result =
"<unset>";
74 errmsg(
"unrecognized value for %s option \"%s\": \"%s\"",
103 result =
rint(result);
109 errmsg(
"timeout value is out of range"));
114 errmsg(
"timeout cannot be negative"));
131 errmsg(
"option \"%s\" not recognized",
162 errmsg(
"WAIT FOR must be called without an active or registered snapshot"),
163 errdetail(
"WAIT FOR cannot be executed from a function or procedure, nor within a transaction with an isolation level higher than READ COMMITTED."));
180 errmsg(
"recovery is in progress"),
181 errhint(
"Waiting for primary_flush can only be done on a primary server. "
182 "Use standby_flush mode on a standby server.")));
208 errmsg(
"timed out while waiting for target LSN %X/%08X to be replayed; current standby_replay LSN %X/%08X",
216 errmsg(
"timed out while waiting for target LSN %X/%08X to be written; current standby_write LSN %X/%08X",
224 errmsg(
"timed out while waiting for target LSN %X/%08X to be flushed; current standby_flush LSN %X/%08X",
232 errmsg(
"timed out while waiting for target LSN %X/%08X to be flushed; current primary_flush LSN %X/%08X",
238 elog(
ERROR,
"unexpected wait LSN type %d", lsnType);
257 errmsg(
"recovery is not in progress"),
258 errdetail(
"Recovery ended before target LSN %X/%08X was replayed; last standby_replay LSN %X/%08X.",
266 errmsg(
"recovery is not in progress"),
267 errdetail(
"Recovery ended before target LSN %X/%08X was written; last standby_write LSN %X/%08X.",
275 errmsg(
"recovery is not in progress"),
276 errdetail(
"Recovery ended before target LSN %X/%08X was flushed; last standby_flush LSN %X/%08X.",
282 elog(
ERROR,
"unexpected wait LSN type %d", lsnType);
292 errmsg(
"recovery is not in progress"),
293 errhint(
"Waiting for the standby_replay LSN can only be executed during recovery."));
299 errmsg(
"recovery is not in progress"),
300 errhint(
"Waiting for the standby_write LSN can only be executed during recovery."));
306 errmsg(
"recovery is not in progress"),
307 errhint(
"Waiting for the standby_flush LSN can only be executed during recovery."));
311 elog(
ERROR,
"unexpected wait LSN type %d", lsnType);
316 result =
"not in recovery";
#define Assert(condition)
#define FLOAT8_FITS_IN_INT64(num)
char * defGetString(DefElem *def)
bool defGetBoolean(DefElem *def)
void errorConflictingDefElem(DefElem *defel, ParseState *pstate)
int errdetail(const char *fmt,...)
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
const TupleTableSlotOps TTSOpsVirtual
void end_tup_output(TupOutputState *tstate)
TupOutputState * begin_tup_output_tupdesc(DestReceiver *dest, TupleDesc tupdesc, const TupleTableSlotOps *tts_ops)
#define do_text_output_oneline(tstate, str_to_emit)
#define DirectFunctionCall1(func, arg1)
bool parse_real(const char *value, double *result, int flags, const char **hintmsg)
int parser_errposition(ParseState *pstate, int location)
#define foreach_node(type, var, lst)
Datum pg_lsn_in(PG_FUNCTION_ARGS)
static XLogRecPtr DatumGetLSN(Datum X)
int pg_strcasecmp(const char *s1, const char *s2)
static Datum CStringGetDatum(const char *X)
bool ActiveSnapshotSet(void)
bool HaveRegisteredOrActiveSnapshot(void)
void PopActiveSnapshot(void)
void InvalidateCatalogSnapshot(void)
#define InvalidTransactionId
TupleDesc CreateTemplateTupleDesc(int natts)
void TupleDescInitEntry(TupleDesc desc, AttrNumber attributeNumber, const char *attributeName, Oid oidtypeid, int32 typmod, int attdim)
void ExecWaitStmt(ParseState *pstate, WaitStmt *stmt, DestReceiver *dest)
TupleDesc WaitStmtResultDesc(WaitStmt *stmt)
bool RecoveryInProgress(void)
#define LSN_FORMAT_ARGS(lsn)
bool PromoteIsTriggered(void)
XLogRecPtr GetCurrentLSNForWaitType(WaitLSNType lsnType)
WaitLSNResult WaitForLSN(WaitLSNType lsnType, XLogRecPtr targetLSN, int64 timeout)
@ WAIT_LSN_RESULT_NOT_IN_RECOVERY
@ WAIT_LSN_RESULT_TIMEOUT
@ WAIT_LSN_RESULT_SUCCESS
@ WAIT_LSN_TYPE_PRIMARY_FLUSH
@ WAIT_LSN_TYPE_STANDBY_REPLAY
@ WAIT_LSN_TYPE_STANDBY_FLUSH
@ WAIT_LSN_TYPE_STANDBY_WRITE