Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit01363be

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.comBackpatch through 9.4
1 parent88231ec commit01363be

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)

[8]ページ先頭

©2009-2025 Movatter.jp