diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index c715ca25508..1cc80a540ac 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -16469,7 +16469,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
pg_xlog_replay_pause()
void
- Pauses recovery immediately.
+ Pauses recovery immediately (restricted to superusers).
@@ -16477,7 +16477,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
pg_xlog_replay_resume()
void
- Restarts recovery if it was paused.
+ Restarts recovery if it was paused (restricted to superusers).
@@ -16585,7 +16585,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
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.
diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c
index f186468dd2c..133143db929 100644
--- a/src/backend/access/transam/xlogfuncs.c
+++ b/src/backend/access/transam/xlogfuncs.c
@@ -382,11 +382,6 @@ pg_xlog_replay_resume(PG_FUNCTION_ARGS)
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),