@@ -131,7 +131,6 @@ doc/src/sgml/pgprobackup.sgml
131
131
<arg choice =" plain" ><option >archive-push</option ></arg >
132
132
<arg choice =" plain" ><option >-B</option > <replaceable >backup_dir</replaceable ></arg >
133
133
<arg choice =" plain" ><option >--instance</option > <replaceable >instance_name</replaceable ></arg >
134
- <arg choice =" plain" ><option >--wal-file-path</option > <replaceable >wal_file_path</replaceable ></arg >
135
134
<arg choice =" plain" ><option >--wal-file-name</option > <replaceable >wal_file_name</replaceable ></arg >
136
135
<arg rep =" repeat" ><replaceable >option</replaceable ></arg >
137
136
</cmdsynopsis >
@@ -786,7 +785,7 @@ ALTER ROLE backup WITH REPLICATION;
786
785
parameter, as follows:
787
786
</para >
788
787
<programlisting >
789
- archive_command = '<replaceable >install_dir</replaceable >/pg_probackup archive-push -B <replaceable >backup_dir</replaceable > --instance <replaceable >instance_name</replaceable > --wal-file-path=%p --wal-file- name=%f [<replaceable >remote_options</replaceable >]'
788
+ archive_command = '<replaceable >install_dir</replaceable >/pg_probackup archive-push -B <replaceable >backup_dir</replaceable > --instance <replaceable >instance_name</replaceable > --wal-file-name=%f [<replaceable >remote_options</replaceable >]'
790
789
</programlisting >
791
790
</listitem >
792
791
</itemizedlist >
@@ -3934,9 +3933,12 @@ pg_probackup delete -B <replaceable>backup_dir</replaceable> --instance <replace
3934
3933
<title >archive-push</title >
3935
3934
<programlisting >
3936
3935
pg_probackup archive-push -B <replaceable >backup_dir</replaceable > --instance <replaceable >instance_name</replaceable >
3937
- --wal-file-path=<replaceable >wal_file_path</replaceable > --wal-file-name=<replaceable >wal_file_name</replaceable >
3938
- [--help] [--compress] [--compress-algorithm=<replaceable >compression_algorithm</replaceable >]
3939
- [--compress-level=<replaceable >compression_level</replaceable >] [--overwrite]
3936
+ --wal-file-name=<replaceable >wal_file_name</replaceable >
3937
+ [--help] [--no-sync] [--compress] [--no-ready-rename] [--overwrite]
3938
+ [-j <replaceable >num_threads</replaceable >] [--batch-size=<replaceable >batch_size</replaceable >]
3939
+ [--archive-timeout=<replaceable >timeout</replaceable >]
3940
+ [--compress-algorithm=<replaceable >compression_algorithm</replaceable >]
3941
+ [--compress-level=<replaceable >compression_level</replaceable >]
3940
3942
[<replaceable >remote_options</replaceable >] [<replaceable >logging_options</replaceable >]
3941
3943
</programlisting >
3942
3944
<para >
@@ -3961,13 +3963,24 @@ pg_probackup archive-push -B <replaceable>backup_dir</replaceable> --instance <r
3961
3963
with the <option >--overwrite</option > flag.
3962
3964
</para >
3963
3965
<para >
3964
- The files are copied to a temporary file with the
3965
- <literal >.part</literal > suffix. After the copy is
3966
- done, atomic rename is performed. This algorithm ensures that a
3967
- failed <command >archive-push</command > will not stall continuous archiving and
3968
- that concurrent archiving from multiple sources into a single
3969
- WAL archive have no risk of archive corruption. WAL segments copied to
3970
- the archive are synced to disk.
3966
+ Every file is copied to a temporary file with the
3967
+ <literal >.part</literal > suffix. If the temporary file already
3968
+ exists, <application >pg_probackup</application > will wait
3969
+ <option >archive_timeout</option > seconds before discarding it.
3970
+ After the copy is done, atomic rename is performed.
3971
+ This algorithm ensures that a failed <command >archive-push</command >
3972
+ will not stall continuous archiving and that concurrent archiving from
3973
+ multiple sources into a single WAL archive have no risk of archive
3974
+ corruption.
3975
+ </para >
3976
+ <para >
3977
+ To speed up archiving, especially in remote mode, <command >archive-push</command >
3978
+ can be run on multiple threads using <option >-j num_threads</option > option.
3979
+ Files can also be copied in batches using option <option >--batch-size</option >.
3980
+ </para >
3981
+ <para >
3982
+ WAL segments copied to the archive are synced to disk unless
3983
+ <option >--no-sync</option > flag is used.
3971
3984
</para >
3972
3985
<para >
3973
3986
You can use <command >archive-push</command > in the
@@ -4073,7 +4086,8 @@ pg_probackup archive-get -B <replaceable>backup_dir</replaceable> --instance <re
4073
4086
<para >
4074
4087
Sets the number of parallel threads for <command >backup</command >,
4075
4088
<command >restore</command >, <command >merge</command >,
4076
- <command >validate</command >, and <command >checkdb</command > processes.
4089
+ <command >validate</command >, <command >checkdb</command > and
4090
+ <command >archive-push</command > processes.
4077
4091
</para >
4078
4092
</listitem >
4079
4093
</varlistentry >
@@ -4732,6 +4746,48 @@ pg_probackup archive-get -B <replaceable>backup_dir</replaceable> --instance <re
4732
4746
</para >
4733
4747
</listitem >
4734
4748
</varlistentry >
4749
+
4750
+ <varlistentry >
4751
+ <term ><option >--batch-size=batch_size</option ></term >
4752
+ <listitem >
4753
+ <para >
4754
+ Sets the maximum number of files to be copied into archive by signle
4755
+ <command >archive-push</command > process.
4756
+ </para >
4757
+ </listitem >
4758
+ </varlistentry >
4759
+
4760
+ <varlistentry >
4761
+ <term ><option >--archive-timeout=<replaceable >wait_time</replaceable ></option ></term >
4762
+ <listitem >
4763
+ <para >
4764
+ Sets the timeout for considering existing <literal >.part</literal > file to be stale. By default <application >pg_probackup</application > waits 300 seconds.
4765
+ </para >
4766
+ </listitem >
4767
+ </varlistentry >
4768
+
4769
+ <varlistentry >
4770
+ <term ><option >--no-ready-rename</option ></term >
4771
+ <listitem >
4772
+ <para >
4773
+ Do not rename status files in <literal >archive_status</literal > directory.
4774
+ This option should be used only if <parameter >archive_command</parameter >
4775
+ contain multiple commands.
4776
+ </para >
4777
+ </listitem >
4778
+ </varlistentry >
4779
+
4780
+ <varlistentry >
4781
+ <term ><option >--no-sync</option ></term >
4782
+ <listitem >
4783
+ <para >
4784
+ Do not sync copied WAL files to disk. You can use this flag to speed
4785
+ up archiving process. Using this flag can result in WAL archive
4786
+ corruption in case of operating system or hardware crash.
4787
+ </para >
4788
+ </listitem >
4789
+ </varlistentry >
4790
+
4735
4791
</variablelist >
4736
4792
</para >
4737
4793
</refsect3 >
0 commit comments