Skip to content

Commit dceed02

Browse files
committed
Merge branch 'master' into release_2_5
2 parents 5bf17cc + 8993131 commit dceed02

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

doc/pgprobackup.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1874,6 +1874,10 @@ pg_probackup restore -B <replaceable>backup_dir</replaceable> --instance <replac
18741874
you must drop the excluded databases using
18751875
<command>DROP DATABASE</command> command.
18761876
</para>
1877+
<para>
1878+
If want to decouple a single cluster with multiple databases into separate clusters with minimal downtime, then
1879+
you can partially restore cluster as standby via <option>--restore-as-replica</option> options.
1880+
</para>
18771881
<note>
18781882
<para>
18791883
The <literal>template0</literal> and

src/utils/remote.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ void wait_ssh(void)
8282
#endif
8383
}
8484

85+
/*
86+
* On windows we launch a new pbk process via 'pg_probackup ssh ...'
87+
* so this process would new that it should exec ssh, because
88+
* there is no fork on Windows.
89+
*/
8590
#ifdef WIN32
8691
void launch_ssh(char* argv[])
8792
{

tests/backup.py

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1968,7 +1968,7 @@ def test_basic_missing_dir_permissions(self):
19681968
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(
19691969
repr(e.message), self.cmd))
19701970

1971-
os.chmod(full_path, 700)
1971+
os.rmdir(full_path)
19721972

19731973
# Clean after yourself
19741974
self.del_test_dir(module_name, fname, [node])
@@ -2899,3 +2899,34 @@ def test_issue_203(self):
28992899

29002900
# Clean after yourself
29012901
self.del_test_dir(module_name, fname)
2902+
2903+
# @unittest.skip("skip")
2904+
def test_issue_231(self):
2905+
"""
2906+
https://github.com/postgrespro/pg_probackup/issues/231
2907+
"""
2908+
fname = self.id().split('.')[3]
2909+
backup_dir = os.path.join(self.tmp_path, module_name, fname, 'backup')
2910+
node = self.make_simple_node(
2911+
base_dir=os.path.join(module_name, fname, 'node'),
2912+
set_replication=True,
2913+
initdb_params=['--data-checksums'],
2914+
pg_options={'autovacuum': 'off'})
2915+
2916+
self.init_pb(backup_dir)
2917+
self.add_instance(backup_dir, 'node', node)
2918+
node.slow_start()
2919+
2920+
datadir = os.path.join(node.data_dir, '123')
2921+
2922+
try:
2923+
self.backup_node(
2924+
backup_dir, 'node', node,
2925+
data_dir='{0}'.format(datadir), return_id=False)
2926+
except:
2927+
pass
2928+
2929+
self.backup_node(backup_dir, 'node', node, options=['--stream'])
2930+
2931+
# Clean after yourself
2932+
self.del_test_dir(module_name, fname)

0 commit comments

Comments
 (0)