summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeff Davis2024-03-09 19:48:52 +0000
committerJeff Davis2024-03-09 19:50:04 +0000
commit5ba8b70debb119813f241069bf359c00e4a784f0 (patch)
treed331e3d607ffe2d335a83e48628c55adaacfac57 /src
parentf160bf06f72ab242a8336eff108a1f4e69539b77 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_upgrade/t/002_pg_upgrade.pl8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bin/pg_upgrade/t/002_pg_upgrade.pl b/src/bin/pg_upgrade/t/002_pg_upgrade.pl
index d951ed3af0b..16b42d475fd 100644
--- a/src/bin/pg_upgrade/t/002_pg_upgrade.pl
+++ b/src/bin/pg_upgrade/t/002_pg_upgrade.pl
@@ -246,15 +246,19 @@ if (defined($ENV{oldinstall}))
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.
$newnode->command_ok(
[
'psql', '-X',
'-v', 'ON_ERROR_STOP=1',
- '-c', $upcmds,
'-d', $oldnode->connstr($updb),
+ @command_args,
],
"ran version adaptation commands for database $updb");
}