Skip to content

Commit 5ba8b70

Browse files
committed
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
1 parent f160bf0 commit 5ba8b70

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/bin/pg_upgrade/t/002_pg_upgrade.pl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,15 +246,19 @@ sub filter_dump
246246

247247
foreach my $updb (keys %$adjust_cmds)
248248
{
249-
my $upcmds = join(";\n", @{ $adjust_cmds->{$updb} });
249+
my @command_args = ();
250+
for my $upcmd (@{ $adjust_cmds->{$updb} })
251+
{
252+
push @command_args, '-c', $upcmd;
253+
}
250254

251255
# For simplicity, use the newer version's psql to issue the commands.
252256
$newnode->command_ok(
253257
[
254258
'psql', '-X',
255259
'-v', 'ON_ERROR_STOP=1',
256-
'-c', $upcmds,
257260
'-d', $oldnode->connstr($updb),
261+
@command_args,
258262
],
259263
"ran version adaptation commands for database $updb");
260264
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy