<phrase>where <replaceable class="PARAMETER">option</replaceable> can be:</phrase>
- IS_TEMPLATE <replaceable class="PARAMETER">istemplate</replaceable>
ALLOW_CONNECTIONS <replaceable class="PARAMETER">allowconn</replaceable>
CONNECTION LIMIT <replaceable class="PARAMETER">connlimit</replaceable>
+ IS_TEMPLATE <replaceable class="PARAMETER">istemplate</replaceable>
ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> RENAME TO <replaceable>new_name</replaceable>
</listitem>
</varlistentry>
- <varlistentry>
- <term><replaceable class="parameter">istemplate</replaceable></term>
- <listitem>
- <para>
- If true, then this database can be cloned by any user with <literal>CREATEDB</literal>
- privileges; if false, then only superusers or the owner of the
- database can clone it.
- </para>
- </listitem>
- </varlistentry>
-
<varlistentry>
<term><replaceable class="parameter">allowconn</replaceable></term>
<listitem>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><replaceable class="parameter">istemplate</replaceable></term>
+ <listitem>
+ <para>
+ If true, then this database can be cloned by any user with <literal>CREATEDB</literal>
+ privileges; if false, then only superusers or the owner of the
+ database can clone it.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><replaceable>new_name</replaceable></term>
<listitem>
[ LC_COLLATE [=] <replaceable class="parameter">lc_collate</replaceable> ]
[ LC_CTYPE [=] <replaceable class="parameter">lc_ctype</replaceable> ]
[ TABLESPACE [=] <replaceable class="parameter">tablespace_name</replaceable> ]
- [ IS_TEMPLATE [=] <replaceable class="parameter">istemplate</replaceable> ]
[ ALLOW_CONNECTIONS [=] <replaceable class="parameter">allowconn</replaceable> ]
[ CONNECTION LIMIT [=] <replaceable class="parameter">connlimit</replaceable> ] ]
+ [ IS_TEMPLATE [=] <replaceable class="parameter">istemplate</replaceable> ]
</synopsis>
</refsynopsisdiv>
</listitem>
</varlistentry>
- <varlistentry>
- <term><replaceable class="parameter">istemplate</replaceable></term>
- <listitem>
- <para>
- If true, then this database can be cloned by any user with <literal>CREATEDB</literal>
- privileges; if false (the default), then only superusers or the owner
- of the database can clone it.
- </para>
- </listitem>
- </varlistentry>
-
<varlistentry>
<term><replaceable class="parameter">allowconn</replaceable></term>
<listitem>
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><replaceable class="parameter">istemplate</replaceable></term>
+ <listitem>
+ <para>
+ If true, then this database can be cloned by any user with <literal>CREATEDB</literal>
+ privileges; if false (the default), then only superusers or the owner
+ of the database can clone it.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
<para>
<para>
The <command>CREATE POLICY</command> command defines a new policy for a
- table. Note that row level security must also be enabled on the table using
+ table. Note that row-level security must also be enabled on the table using
<command>ALTER TABLE</command> in order for created policies to be applied.
</para>
Name of the event source for <application>pg_ctl</application> to use
for logging to the event log when running as a Windows service. The
default is <literal>PostgreSQL</literal>. Note that this only controls
- the logging from <application>pg_ctl</application> itself - once
+ the logging from <application>pg_ctl</application> itself; once
started, the server will use the event source specified
by <xref linkend="guc-event-source">. Should the server fail during
- early startup, it may also log using the default event
+ early startup, it might also log using the default event
source <literal>PostgreSQL</literal>.
</para>
</listitem>
<listitem>
<para>
This option is relevant only when dumping the contents of a table
- which has row security. By default, pg_dump will set
- <literal>ROW_SECURITY</literal> to <literal>OFF</literal>, to ensure
+ which has row security. By default, <application>pg_dump</application> will set
+ <xref linkend="guc-row-security"> to off, to ensure
that all data is dumped from the table. If the user does not have
sufficient privileges to bypass row security, then an error is thrown.
This parameter instructs <application>pg_dump</application> to set
- row_security to 'ON' instead, allowing the user to dump the contents
- of the table which they have access to.
+ <xref linkend="guc-row-security"> to on instead, allowing the user
+ to dump the parts of the contents of the table that they have access to.
</para>
</listitem>
</listitem>
</varlistentry>
- <varlistentry>
- <term><option>--snapshot=<replaceable class="parameter">snapshotname</replaceable></option></term>
- <listitem>
- <para>
- Use the specified synchronized snapshot when making a dump of the
- database (see
- <xref linkend="functions-snapshot-synchronization-table"> for more
- details).
- </para>
- <para>
- This option is useful when needing to synchronize the dump with
- a logical replication slot (see <xref linkend="logicaldecoding">)
- or with a concurrent session.
- </para>
- <para>
- In the case of a parallel dump, the snapshot name defined by this
- option is used rather than taking a new snapshot.
- </para>
- </listitem>
- </varlistentry>
-
<varlistentry>
<term><option>--serializable-deferrable</option></term>
<listitem>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--snapshot=<replaceable class="parameter">snapshotname</replaceable></option></term>
+ <listitem>
+ <para>
+ Use the specified synchronized snapshot when making a dump of the
+ database (see
+ <xref linkend="functions-snapshot-synchronization-table"> for more
+ details).
+ </para>
+ <para>
+ This option is useful when needing to synchronize the dump with
+ a logical replication slot (see <xref linkend="logicaldecoding">)
+ or with a concurrent session.
+ </para>
+ <para>
+ In the case of a parallel dump, the snapshot name defined by this
+ option is used rather than taking a new snapshot.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><option>--use-set-session-authorization</></term>
<listitem>
<para>
Unlike the standby's WAL receiver, <application>pg_receivexlog</>
- flushes WAL data only when a WAL file is closed, by default.
+ by default flushes WAL data only when a WAL file is closed.
<literal>--synchronous</> option must be specified to flush WAL data
in real time and ensure it's safely flushed to disk.
</para>
</varlistentry>
<varlistentry>
- <term><option>--enable-row-security</></term> <listitem>
+ <term><option>--enable-row-security</></term>
+ <listitem>
<para>
This option is relevant only when restoring the contents of a table
- which has row security. By default, pg_restore will set
- <literal>ROW_SECURITY</literal> to <literal>OFF</literal>, to ensure
+ which has row security. By default, <application>pg_restore</application> will set
+ <xref linkend="guc-row-security"> to off, to ensure
that all data is restored in to the table. If the user does not have
sufficient privileges to bypass row security, then an error is thrown.
This parameter instructs <application>pg_restore</application> to set
- row_security to 'ON' instead, allowing the user to attempt to restore
- the contents of the table with row security enabled. This may still
+ <xref linkend="guc-row-security"> to on instead, allowing the user to attempt to restore
+ the contents of the table with row security enabled. This might still
fail if the user does not have the right to insert the rows from the
dump into the table.
</para>
<para>
- Note that this option currently also requires the dump be in INSERT
- format as COPY TO does not support row security.
+ Note that this option currently also requires the dump be in <command>INSERT</command>
+ format, as <command>COPY TO</command> does not support row security.
</para>
-
</listitem>
</varlistentry>
<filename>recovery.conf</> file in the target data directory with a
suitable <varname>restore_command</>.
</para>
+
+ <para>
+ <application>pg_rewind</> requires that the target server either has
+ the <xref linkend="guc-wal-log-hints"> option is enabled
+ in <filename>postgresql.conf</> or that data checksums were enabled when
+ the cluster was initialized with <application>initdb</>. Neither of these
+ are currently on by default.
+ <xref linkend="guc-full-page-writes"> must also be enabled. That is the
+ default.
+ </para>
</refsect1>
<refsect1>
<varlistentry>
<term><option>-V</option></term>
<term><option>--version</option></term>
- <listitem><para>Display version information, then exit</para></listitem>
+ <listitem><para>Display version information, then exit.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-?</option></term>
<term><option>--help</option></term>
- <listitem><para>Show help, then exit</para></listitem>
+ <listitem><para>Show help, then exit.</para></listitem>
</varlistentry>
</variablelist>
<refsect1>
<title>Notes</title>
- <para>
- <application>pg_rewind</> requires that the <varname>wal_log_hints</>
- option is enabled in <filename>postgresql.conf</>, or that data checksums
- were enabled when the cluster was initialized with <application>initdb</>.
- <varname>full_page_writes</> must also be enabled.
- </para>
-
<refsect2>
<title>How it works</title>
servers</title>
<para>
- If you have Streaming Replication (<xref
- linkend="streaming-replication">) or Log-Shipping (<xref
+ If you have Streaming Replication (see <xref
+ linkend="streaming-replication">) or Log-Shipping (see <xref
linkend="warm-standby">) standby servers, follow these steps to
upgrade them. You will not be running <application>pg_upgrade</>
on the standby servers, but rather <application>rsync</>. Do not
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>-j <replaceable class="parameter">njobs</replaceable></option></term>
+ <term><option>--jobs=<replaceable class="parameter">njobs</replaceable></option></term>
+ <listitem>
+ <para>
+ Execute the vacuum or analyze commands in parallel by running
+ <replaceable class="parameter">njobs</replaceable>
+ commands simultaneously. This option reduces the time of the
+ processing but it also increases the load on the database server.
+ </para>
+ <para>
+ <application>vacuumdb</application> will open
+ <replaceable class="parameter">njobs</replaceable> connections to the
+ database, so make sure your <xref linkend="guc-max-connections">
+ setting is high enough to accommodate all connections.
+ </para>
+ <para>
+ Note that using this mode together with the <option>-f</option>
+ (<literal>FULL</literal>) option might cause deadlock failures if
+ certain system catalogs are processed in parallel.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><option>-q</></term>
<term><option>--quiet</></term>
</listitem>
</varlistentry>
- <varlistentry>
- <term><option>-j <replaceable class="parameter">njobs</replaceable></option></term>
- <term><option>--jobs=<replaceable class="parameter">njobs</replaceable></option></term>
- <listitem>
- <para>
- Execute the vacuum or analyze commands in parallel by running
- <replaceable class="parameter">njobs</replaceable>
- commands simultaneously. This option reduces the time of the
- processing but it also increases the load on the database server.
- </para>
- <para>
- <application>vacuumdb</application> will open
- <replaceable class="parameter">njobs</replaceable> connections to the
- database, so make sure your <xref linkend="guc-max-connections">
- setting is high enough to accommodate all connections.
- </para>
- <para>
- Note that using this mode together with the <option>-f</option>
- (<literal>FULL</literal>) option might cause deadlock failures if
- certain system catalogs are processed in parallel.
- </para>
- </listitem>
- </varlistentry>
-
<varlistentry>
<term><option>--analyze-in-stages</option></term>
<listitem>