Also update docs to mention which function are super-user-only.
Report by
[email protected]
Backpatch through 9.4
pg_xlog_replay_pause()
void
- Pauses recovery immediately.
+ Pauses recovery immediately (restricted to superusers).
|
pg_xlog_replay_resume()
void
- Restarts recovery if it was paused.
+ Restarts recovery if it was paused (restricted to superusers).
for controlling and interacting with replication features.
See
and for information about the
- underlying features.
+ underlying features. Use of these functions is restricted to superusers.
Datum
pg_is_xlog_replay_paused(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),