8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57a7a3a commit bfc8068Copy full SHA for bfc8068
doc/src/sgml/ref/pg_rewind.sgml
@@ -155,10 +155,12 @@ PostgreSQL documentation
155
<listitem>
156
<para>
157
Specifies a libpq connection string to connect to the source
158
- <productname>PostgreSQL</productname> server to synchronize the target with.
159
- The connection must be a normal (non-replication) connection
160
- with superuser access. This option requires the source
161
- server to be running and not in recovery mode.
+ <productname>PostgreSQL</productname> server to synchronize the target
+ with. The connection must be a normal (non-replication) connection
+ with a role having sufficient permissions to execute the functions
+ used by <application>pg_rewind</application> on the source server
162
+ (see Notes section for details) or a superuser role. This option
163
+ requires the source server to be running and not in recovery mode.
164
</para>
165
</listitem>
166
</varlistentry>
@@ -246,6 +248,30 @@ PostgreSQL documentation
246
248
<refsect1>
247
249
<title>Notes</title>
250
251
+ <para>
252
+ When executing <application>pg_rewind</application> using an online
253
+ cluster as source, a role having sufficient permissions to execute the
254
+ functions used by <application>pg_rewind</application> on the source
255
+ cluster can be used instead of a superuser. Here is how to create such
256
+ a role, named <literal>rewind_user</literal> here:
257
+<programlisting>
258
+CREATE USER rewind_user LOGIN;
259
+GRANT EXECUTE ON function pg_catalog.pg_ls_dir(text, boolean, boolean) TO rewind_user;
260
+GRANT EXECUTE ON function pg_catalog.pg_stat_file(text, boolean) TO rewind_user;
261
+GRANT EXECUTE ON function pg_catalog.pg_read_binary_file(text) TO rewind_user;
262
+GRANT EXECUTE ON function pg_catalog.pg_read_binary_file(text, bigint, bigint, boolean) TO rewind_user;
263
+</programlisting>
264
+ </para>
265
+
266
267
268
+ cluster as source which has been recently promoted, it is necessary
269
+ to execute a <command>CHECKPOINT</command> after promotion so as its
270
+ control file reflects up-to-date timeline information, which is used by
271
+ <application>pg_rewind</application> to check if the target cluster
272
+ can be rewound using the designated source cluster.
273
274
275
<refsect2>
276
<title>How it works</title>
277