-
Notifications
You must be signed in to change notification settings - Fork 89
Catchup command implementation #392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
51e20d9
fix forgotten in 29adb5b comment
kulaginm c4a8488
porting catchup to release_2_5 branch
kulaginm 3d2bcda
Merge branch 'master' into release_2_5-pgpro-4850
gsmolk 69db990
use correct args for wait_wal_lsn()
gsmolk 6a3c3d3
[Issue #277] review, some improvements, refactoring and overhaul, sev...
gsmolk 2afa159
[Issue #277] run catchup test in remote mode only if envvar PGPROBACK...
gsmolk 2f843a7
[Issue #227] Remove support of ptrack1.x, clean up redundant code in ...
gsmolk 2f8617d
cosmetic changes
kulaginm 61f167c
rename pg_checksum_enable() to pg_is_checksum_enabled
kulaginm 30543b2
remove unused instanceState from pg_start_backup()
kulaginm 1657fee
Refactor wait_wal_lsn(): remove unused pgBackup * parameter and repla...
kulaginm fffa8b1
Refactor pg_stop_backup(): remove useless conn variable
kulaginm ed5d71e
Make some functions and variables (from backup.c) accessible from oth...
kulaginm f7196e8
Remove some references to global stream_wal variable
kulaginm bd9cd9f
remove unused variable externaldir
kulaginm 1793c68
Yet another split of pg_stop_backup(): separate verification of stop_...
kulaginm a13a23f
Merge branch 'release_2_5-pgpro-5018' into release_2_5-pgpro-4850
kulaginm 7415e6c
Merge branch 'release_2_5-pg_stop_backup-decomposition2' into release...
kulaginm 02aa321
catchup update #1
kulaginm 24bd657
make separate function for node creation in catchup tests (make_empty...
kulaginm eab58c1
simple delta catchup test
kulaginm 9efea2b
Remove get_min_recovery_point() and use get_redo() instead
kulaginm 1c1a89c
catchup update #2
kulaginm d7e2606
catchup update #3 (tablespace mapping fix)
kulaginm 2c8b7e9
create pfilearray_clear_locks() helper function
kulaginm bbacdf0
Merge remote-tracking branch 'origin/release_2_5-pg_stop_backup-decom...
kulaginm 50cd84d
followup for 02aa32107433c34f6f7f264585e051cc7b5dbab1
kulaginm bc2f392
catchup update #4 (fix removed files)
kulaginm 55ee681
Merge remote-tracking branch 'origin/release_2_5' into release_2_5-pg...
kulaginm 05c451e
test stabilization
kulaginm fd7571b
test_tablefile_truncation added
kulaginm 72b5bba
Improve catchup help
kulaginm bee476c
pg_control now is synced last
kulaginm 74cd21a
apply lubennikovaav review.patch
kulaginm 271cf16
indent correction as noted by Roman Zharkov
kulaginm 8e03b8d
Review answer #1
kulaginm b294557
typo
kulaginm 2e3adf1
check emptyness of dest_pgdata
kulaginm 861ddd3
check that user uses tablespace_mapping
kulaginm e865c83
fix destination file existance
kulaginm 2598c99
Print octal permissions in tests compare_pgdata()
kulaginm 746a1a5
fix local delta backup
kulaginm 2cceb71
Review answer #2
kulaginm 803a7e3
add more catchup preflight checks
kulaginm 5b46f09
rename cmdline parameters, remove annoyng message
kulaginm 18c4b46
one more review pass
lubennikovaav 19ace74
Merge remote-tracking branch 'origin/release_2_5' into release_2_5-pg...
kulaginm 01fe2f9
Additional tablespace checks
kulaginm 39df7ac
[DOC] Added documentation for catchup command
indrups fc76038
Proofread catchup messages
indrups 132ec94
fix lost lost --no-color option in docs
kulaginm dc8d425
Merge branch 'release_2_5-pgpro-4850' of https://github.com/postgresp...
kulaginm ce34427
Pure language refinement
indrups 5089400
fix datafile truncation bug
kulaginm 3e43d00
Wording in documentation refined from techwriters' feedback
indrups 55c114f
bugfix: remove unnecessary tablespace_map file write
kulaginm 8a9c6ce
Merge branch 'release_2_5-pgpro-4850' of https://github.com/postgresp...
kulaginm 9cde0f9
Modify tablespace preflight checks (as per comment by Roman Zharkov)
kulaginm 1ab642a
typo
kulaginm 6240c9f
bugfix: fix incorrect pg_control reading (as per comment by Roman Zha...
kulaginm 1a48b0a
bugfix: add additional cmdline check (reported by Roman Zharkov)
kulaginm 1811eb7
refine catchup tests
kulaginm 629b732
more checks and tests
kulaginm b15fcf6
refine test_same_db_id test
kulaginm ba22e2e
split do_catchup_instance() into parts #1
kulaginm 8d3fb16
TLI tests and TLI check fix
kulaginm 6b6086f
postgres-9.5 compability fix
kulaginm ff444b3
rename tests (include simple tests to basic suite)
kulaginm 83ccabc
add comment of future improvements
kulaginm 4a2419a
Merge remote-tracking branch 'origin/release_2_5' into release_2_5-pg...
kulaginm d987131
fix help message
kulaginm 68cfd5b
[DOC] Documentation updated upon feedback from Probackup team
indrups de58e46
Merge branch 'release_2_5' into release_2_5-pgpro-4850
gsmolk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Wording in documentation refined from techwriters' feedback
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -293,7 +293,7 @@ doc/src/sgml/pgprobackup.sgml | |
</listitem> | ||
<listitem condition="12+"> | ||
<para> | ||
Catchup: <quote>catching up</quote> of a fallen-behind standby server. | ||
Catchup: cloning a <productname>PostgreSQL</productname> instance for a fallen-behind standby server to <quote>catch up</quote> with master. | ||
</para> | ||
</listitem> | ||
</itemizedlist> | ||
|
@@ -3437,16 +3437,16 @@ pg_probackup delete -B <replaceable>backup_dir</replaceable> --instance <replace | |
</refsect2> | ||
|
||
<refsect2 id="pbk-creating-backup-to-catchup" condition="12+"> | ||
<title>Cloning a Database Instance</title> | ||
<title>Cloning <productname>PostgreSQL</productname> Instance</title> | ||
<para> | ||
<application>pg_probackup</application> can create a copy of a <productname>PostgreSQL</productname> | ||
database instance directly, without using the backup catalog. This allows you | ||
instance directly, without using the backup catalog. This allows you | ||
to add a new standby server in a parallel mode or to have a standby | ||
server that has fallen behind <quote>catch up</quote> with master. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @indrups |
||
</para> | ||
|
||
<para> | ||
Cloning a database instance is different from other <application>pg_probackup</application> | ||
Cloning a <productname>PostgreSQL</productname> instance is different from other <application>pg_probackup</application> | ||
processes: | ||
<itemizedlist> | ||
<listitem> | ||
|
@@ -3469,12 +3469,12 @@ pg_probackup delete -B <replaceable>backup_dir</replaceable> --instance <replace | |
</para> | ||
|
||
<para> | ||
Before cloning a database instance, set up the source database server as follows: | ||
Before cloning a <productname>PostgreSQL</productname> instance, set up the source database server as follows: | ||
<itemizedlist> | ||
<listitem> | ||
<para> | ||
<link linkend="pbk-configuring-the-database-cluster">Configure | ||
the database cluster</link> that contains the database instance to copy. | ||
the database cluster</link> for the instance to copy. | ||
</para> | ||
</listitem> | ||
<listitem> | ||
|
@@ -3491,8 +3491,8 @@ pg_probackup delete -B <replaceable>backup_dir</replaceable> --instance <replace | |
</para> | ||
|
||
<para> | ||
To clone a database instance, ensure that the source | ||
database is running and accepting connections and | ||
To clone a <productname>PostgreSQL</productname> instance, ensure that the source | ||
database server is running and accepting connections and | ||
on the server with the destination database, run the following command: | ||
</para> | ||
<programlisting> | ||
|
@@ -3505,7 +3505,7 @@ pg_probackup catchup -b <replaceable>catchup-mode</replaceable> --source-pgdata= | |
<itemizedlist spacing="compact"> | ||
<listitem> | ||
<para> | ||
FULL — creates a full copy of the database instance. | ||
FULL — creates a full copy of the <productname>PostgreSQL</productname> instance. | ||
The destination directory must be empty for this mode. | ||
</para> | ||
</listitem> | ||
|
@@ -3529,7 +3529,7 @@ pg_probackup catchup -b <replaceable>catchup-mode</replaceable> --source-pgdata= | |
</itemizedlist> | ||
<para> | ||
You can use <link linkend="pbk-connection-opts">connection_options</link> to specify | ||
the connection to the source database, and if it is located on a different server, | ||
the connection to the source database cluster. If it is located on a different server, | ||
also specify <link linkend="pbk-remote-server-opts">remote_options</link>. | ||
If the source database contains tablespaces that must be located in | ||
a different directory, additionally specify the <option>--tablespace-mapping</option> | ||
|
@@ -3544,7 +3544,7 @@ pg_probackup catchup -b <replaceable>catchup-mode</replaceable> --source-pgdata= | |
</programlisting> | ||
</para> | ||
<para> | ||
For example, assume that a remote standby server with the database instance in <filename>/replica-pgdata</filename> data directory has fallen behind. To sync this database instance with that in <filename>/master-pgdata</filename> data directory, you can run | ||
For example, assume that a remote standby server with the <productname>PostgreSQL</productname> instance in <filename>/replica-pgdata</filename> data directory has fallen behind. To sync this instance with the one in <filename>/master-pgdata</filename> data directory, you can run | ||
the <command>catchup</command> command in the <literal>PTRACK</literal> mode on four parallel threads as follows: | ||
<programlisting> | ||
pg_probackup catchup --source-pgdata=/master-pgdata --destination-pgdata=/replica-pgdata -p 5432 -d postgres -U remote-postgres-user --stream --backup-mode=PTRACK --remote-host=remote-hostname --remote-user=remote-unix-username -j 4 | ||
|
@@ -4442,7 +4442,7 @@ pg_probackup catchup -b <replaceable>catchup_mode</replaceable> | |
[<replaceable>connection_options</replaceable>] [<replaceable>remote_options</replaceable>] | ||
</programlisting> | ||
<para> | ||
Creates a copy of a <productname>PostgreSQL</productname> database | ||
Creates a copy of a <productname>PostgreSQL</productname> | ||
instance without using the backup catalog. | ||
|
||
<variablelist> | ||
|
@@ -4456,7 +4456,7 @@ pg_probackup catchup -b <replaceable>catchup_mode</replaceable> | |
<itemizedlist spacing="compact"> | ||
<listitem> | ||
<para> | ||
<literal>FULL</literal> — creates a full copy of the database instance. | ||
<literal>FULL</literal> — creates a full copy of the <productname>PostgreSQL</productname> instance. | ||
</para> | ||
</listitem> | ||
<listitem> | ||
|
@@ -4481,7 +4481,7 @@ pg_probackup catchup -b <replaceable>catchup_mode</replaceable> | |
<term><option>--source-pgdata=<replaceable>path_to_pgdata_on_remote_server</replaceable></option></term> | ||
<listitem> | ||
<para> | ||
Specifies the path to the data directory of the database to be copied, which can be local or remote. | ||
Specifies the path to the data directory of the instance to be copied. The path can be local or remote. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
|
@@ -4490,7 +4490,7 @@ pg_probackup catchup -b <replaceable>catchup_mode</replaceable> | |
<term><option>--destination-pgdata=<replaceable>path_to_local_dir</replaceable></option></term> | ||
<listitem> | ||
<para> | ||
Specifies the path to the local data directory of the database to copy to. | ||
Specifies the path to the local data directory to copy to. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
|
@@ -4541,7 +4541,7 @@ pg_probackup catchup -b <replaceable>catchup_mode</replaceable> | |
</para> | ||
<para> | ||
For details on usage, see the section | ||
<link linkend="pbk-creating-backup-to-catchup">Creating a Catchup Copy</link>. | ||
<link linkend="pbk-creating-backup-to-catchup">Cloning <productname>PostgreSQL</productname> Instance</link>. | ||
</para> | ||
</refsect3> | ||
</refsect2> | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.