/* * pg_xlog_replay_resume - resume recovery now * * Permission checking for this function is managed through the normal * GRANT system. */ Datum pg_xlog_replay_resume(PG_FUNCTION_ARGS) { if (!RecoveryInProgress()) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("recovery is not in progress"), errhint("Recovery control functions can only be executed during recovery."))); SetRecoveryPause(false); PG_RETURN_VOID(); }
/* * pg_xlog_replay_pause - pause recovery now */ Datum pg_xlog_replay_pause(PG_FUNCTION_ARGS) { if (!superuser()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), (errmsg("must be superuser to control recovery")))); if (!RecoveryInProgress()) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("recovery is not in progress"), errhint("Recovery control functions can only be executed during recovery."))); SetRecoveryPause(true); PG_RETURN_VOID(); }