Skip to content

Commit 01363be

Browse files
committed
pg_is_xlog_replay_paused(): remove super-user-only restriction
Also update docs to mention which function are super-user-only. Report by sys-milan@statpro.com Backpatch through 9.4
1 parent 88231ec commit 01363be

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

doc/src/sgml/func.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16471,15 +16471,15 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
1647116471
<literal><function>pg_xlog_replay_pause()</function></literal>
1647216472
</entry>
1647316473
<entry><type>void</type></entry>
16474-
<entry>Pauses recovery immediately.
16474+
<entry>Pauses recovery immediately (restricted to superusers).
1647516475
</entry>
1647616476
</row>
1647716477
<row>
1647816478
<entry>
1647916479
<literal><function>pg_xlog_replay_resume()</function></literal>
1648016480
</entry>
1648116481
<entry><type>void</type></entry>
16482-
<entry>Restarts recovery if it was paused.
16482+
<entry>Restarts recovery if it was paused (restricted to superusers).
1648316483
</entry>
1648416484
</row>
1648516485
</tbody>
@@ -16587,7 +16587,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
1658716587
for controlling and interacting with replication features.
1658816588
See <xref linkend="streaming-replication">
1658916589
and <xref linkend="streaming-replication-slots"> for information about the
16590-
underlying features.
16590+
underlying features. Use of these functions is restricted to superusers.
1659116591
</para>
1659216592

1659316593
<para>

src/backend/access/transam/xlogfuncs.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -382,11 +382,6 @@ pg_xlog_replay_resume(PG_FUNCTION_ARGS)
382382
Datum
383383
pg_is_xlog_replay_paused(PG_FUNCTION_ARGS)
384384
{
385-
if (!superuser())
386-
ereport(ERROR,
387-
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
388-
(errmsg("must be superuser to control recovery"))));
389-
390385
if (!RecoveryInProgress())
391386
ereport(ERROR,
392387
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy