@@ -208,25 +208,6 @@ sub generate_db
208208 }
209209}
210210
211- $oldnode -> safe_psql(" regression" , " VACUUM FULL pg_largeobject;" );
212-
213- # Record the relfrozenxid and relminmxid horizons from the old server.
214- my $horizon_query = <<EOM ;
215- SELECT
216- c.oid::regclass, c.relfrozenxid, c.relminmxid
217- FROM
218- pg_class c, pg_namespace n
219- WHERE
220- c.relnamespace = n.oid AND
221- ((n.nspname !~ '^pg_temp_' AND n.nspname !~ '^pg_toast_temp_' AND
222- n.nspname NOT IN ('pg_catalog', 'information_schema', 'binary_upgrade',
223- 'pg_toast'))
224- OR (n.nspname = 'pg_catalog' AND relname IN ('pg_largeobject')))
225- ORDER BY c.oid::regclass::text
226- EOM
227- $horizon_query =~ s /\s +/ / g ; # run it together on one line
228- my $horizon1 = $oldnode -> safe_psql(' regression' , $horizon_query );
229-
230211# In a VPATH build, we'll be started in the source directory, but we want
231212# to run pg_upgrade in the build directory so that any files generated finish
232213# in it, like delete_old_cluster.{sh,bat}.
@@ -311,9 +292,6 @@ sub generate_db
311292 ],
312293 ' dump after running pg_upgrade' );
313294
314- # And record the horizons from the upgraded cluster as well.
315- my $horizon2 = $newnode -> safe_psql(' regression' , $horizon_query );
316-
317295# Compare the two dumps, there should be no differences.
318296my $compare_res = compare(" $tempdir /dump1.sql" , " $tempdir /dump2.sql" );
319297is($compare_res , 0, ' old and new dumps match after pg_upgrade' );
@@ -331,28 +309,4 @@ sub generate_db
331309 print " === EOF ===\n " ;
332310}
333311
334- # Compare the horizons, there should be no differences.
335- my $horizons_ok = $horizon1 eq $horizon2 ;
336- ok($horizons_ok , ' old and new horizons match after pg_upgrade' );
337-
338- # Provide more context if the horizons do not match.
339- if (! $horizons_ok )
340- {
341- # output is long, so use diff to compare
342- open my $fh , " >" , " $tempdir /horizon1.txt" or die " could not open file: $! " ;
343- print $fh $horizon1 ;
344- close $fh ;
345- open $fh , " >" , " $tempdir /horizon2.txt" or die " could not open file: $! " ;
346- print $fh $horizon2 ;
347- my ($stdout , $stderr ) =
348- run_command([ ' diff' , " $tempdir /horizon1.txt" , " $tempdir /horizon2.txt" ]);
349- close $fh ;
350- print " === diff of $tempdir /horizon1.txt and $tempdir /horizon2.txt\n " ;
351- print " === stdout ===\n " ;
352- print $stdout ;
353- print " === stderr ===\n " ;
354- print $stderr ;
355- print " === EOF ===\n " ;
356- }
357-
358312done_testing();
0 commit comments