mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Fix cross-version pg_upgrade test.
Pass each statement as a separate '-c' arg, so they don't get combined into a single transaction. Discussion: https://postgr.es/m/bca97aecb50b2026b7dbc26604bf31861c819a64.camel@j-davis.com Reviewed-by: Tom Lane
This commit is contained in:
@ -246,15 +246,19 @@ if (defined($ENV{oldinstall}))
|
|||||||
|
|
||||||
foreach my $updb (keys %$adjust_cmds)
|
foreach my $updb (keys %$adjust_cmds)
|
||||||
{
|
{
|
||||||
my $upcmds = join(";\n", @{ $adjust_cmds->{$updb} });
|
my @command_args = ();
|
||||||
|
for my $upcmd (@{ $adjust_cmds->{$updb} })
|
||||||
|
{
|
||||||
|
push @command_args, '-c', $upcmd;
|
||||||
|
}
|
||||||
|
|
||||||
# For simplicity, use the newer version's psql to issue the commands.
|
# For simplicity, use the newer version's psql to issue the commands.
|
||||||
$newnode->command_ok(
|
$newnode->command_ok(
|
||||||
[
|
[
|
||||||
'psql', '-X',
|
'psql', '-X',
|
||||||
'-v', 'ON_ERROR_STOP=1',
|
'-v', 'ON_ERROR_STOP=1',
|
||||||
'-c', $upcmds,
|
|
||||||
'-d', $oldnode->connstr($updb),
|
'-d', $oldnode->connstr($updb),
|
||||||
|
@command_args,
|
||||||
],
|
],
|
||||||
"ran version adaptation commands for database $updb");
|
"ran version adaptation commands for database $updb");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user