mirror of
https://github.com/postgres/postgres.git
synced 2025-06-22 02:52:08 +03:00
pg_basebackup: Add --slot option
This option specifies a replication slot for WAL streaming (-X stream), so that there can be continuous replication slot use between WAL streaming during the base backup and the start of regular streaming replication. Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
This commit is contained in:
@ -173,8 +173,11 @@ END
|
||||
sub psql
|
||||
{
|
||||
my ($dbname, $sql) = @_;
|
||||
my ($stdout, $stderr);
|
||||
print("# Running SQL command: $sql\n");
|
||||
run [ 'psql', '-X', '-q', '-d', $dbname, '-f', '-' ], '<', \$sql or die;
|
||||
run [ 'psql', '-X', '-A', '-t', '-q', '-d', $dbname, '-f', '-' ], '<', \$sql, '>', \$stdout, '2>', \$stderr or die;
|
||||
chomp $stdout;
|
||||
return $stdout;
|
||||
}
|
||||
|
||||
sub slurp_dir
|
||||
|
Reference in New Issue
Block a user