Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit99a0a2a

Browse files
committed
Allow PostgresNode.pm's backup method to accept backup_options.
Partial back-port of commit081876d.A test case for a pending bug fix needs this capability, but the codeon 9.6 is significantly different, so I'm only back-patching thischange as far as v10. We'll have to work around the problem anotherway in v9.6.Discussion:http://postgr.es/m/CAFiTN-tcivNvL0Rg6rD7_CErNfE75H7+gh9WbMxjbgsattja1Q@mail.gmail.com
1 parent6bfcc7d commit99a0a2a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

‎src/test/perl/PostgresNode.pm

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,11 @@ sub append_conf
538538
=item$node->backup(backup_name)
539539
540540
Create a hot backup withB<pg_basebackup> in subdirectoryB<backup_name> of
541-
B<< $node->backup_dir>>, including the WAL. WAL files
542-
fetched at the end of the backup, not streamed.
541+
B<< $node->backup_dir>>, including the WAL.
542+
543+
By default, WAL files are fetched at the end of the backup, not streamed.
544+
You can adjust that and other things by passing an array of additional
545+
B<pg_basebackup> command line options in the keyword parameter backup_options.
543546
544547
You'll have to configure a suitableB<max_wal_senders> on the
545548
target server since it isn't done by default.
@@ -548,15 +551,16 @@ target server since it isn't done by default.
548551

549552
subbackup
550553
{
551-
my ($self,$backup_name) =@_;
554+
my ($self,$backup_name,%params) =@_;
552555
my$backup_path =$self->backup_dir .'/' .$backup_name;
553556
my$name =$self->name;
554557

555558
print"# Taking pg_basebackup$backup_name from node\"$name\"\n";
556559
TestLib::system_or_bail(
557560
'pg_basebackup','-D',$backup_path,'-h',
558561
$self->host,'-p',$self->port,'--checkpoint',
559-
'fast','--no-sync');
562+
'fast','--no-sync',
563+
@{$params{backup_options} });
560564
print"# Backup finished\n";
561565
return;
562566
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp