<literal><function>pg_xlog_replay_pause()</function></literal>
</entry>
<entry><type>void</type></entry>
- <entry>Pauses recovery immediately.
+ <entry>Pauses recovery immediately (restricted to superusers).
</entry>
</row>
<row>
<literal><function>pg_xlog_replay_resume()</function></literal>
</entry>
<entry><type>void</type></entry>
- <entry>Restarts recovery if it was paused.
+ <entry>Restarts recovery if it was paused (restricted to superusers).
</entry>
</row>
</tbody>
for controlling and interacting with replication features.
See <xref linkend="streaming-replication">
and <xref linkend="streaming-replication-slots"> for information about the
- underlying features.
+ underlying features. Use of these functions is restricted to superusers.
</para>
<para>
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),