1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Add option -N/--no-sync to pg_upgrade

This is an option consistent with what the other tools of src/bin/
(pg_checksums, pg_dump, pg_rewind and pg_basebackup) provide which is
useful for leveraging the I/O effort when testing things.  This is not
to be used in a production environment.

All the regression tests of pg_upgrade are updated to use this new
option.  This happens to cut at most a couple of seconds in environments
constrained on I/O, by avoiding a flush of data folder for the new
cluster upgraded.

Author: Michael Paquier
Reviewed-by: Peter Eisentraut
Discussion: https://postgr.es/m/YbrhzuBmBxS/DkfX@paquier.xyz
This commit is contained in:
Michael Paquier
2021-12-18 16:18:45 +09:00
parent 944dc45d1b
commit 3d5ffccb6d
6 changed files with 37 additions and 8 deletions

View File

@ -130,6 +130,22 @@ PostgreSQL documentation
cluster</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-N</option></term>
<term><option>--no-sync</option></term>
<listitem>
<para>
By default, <command>pg_upgrade</command> will wait for all files
of the upgraded cluster to be written safely to disk. This option
causes <command>pg_upgrade</command> to return without waiting, which
is faster, but means that a subsequent operating system crash can leave
the synchronized data directory corrupt. Generally, this option is
useful for testing but should not be used on a production
installation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-o</option> <replaceable class="parameter">options</replaceable></term>
<term><option>--old-options</option> <replaceable class="parameter">options</replaceable></term>