ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not stat file \"%s\": %m", path)));
+ /* XXX temporarily changed to debug buildfarm failures */
+#if 0
ereport(DEBUG2,
(errmsg_internal("removing file \"%s\"", path)));
+#else
+ ereport(LOG,
+ (errmsg_internal("removing file \"%s\" cutoff_time=%llu", path,
+ (unsigned long long) cutoff_time)));
+#endif
}
/*
EOM
($summarized_tli, $summarized_lsn) = split(/\|/, $progress);
note("after insert, summarized TLI $summarized_tli through $summarized_lsn");
+note_wal_summary_dir("after insert", $node1);
# Update a row in the first block of the table and trigger a checkpoint.
$node1->safe_psql('postgres', <<EOM);
EOM
my ($tli, $start_lsn, $end_lsn) = split(/\|/, $details);
note("examining summary for TLI $tli from $start_lsn to $end_lsn");
+note_wal_summary_dir("after new summary", $node1);
# Reconstruct the full pathname for the WAL summary file.
my $filename = sprintf "%s/pg_wal/summaries/%08s%08s%08s%08s%08s.summary",
split(m@/@, $start_lsn),
split(m@/@, $end_lsn);
ok(-f $filename, "WAL summary file exists");
+note_wal_summary_dir("after existence check", $node1);
# Run pg_walsummary on it. We expect block 0 to be modified, but depending
# on where the new tuple ends up, block 1 might also be modified, so we
my ($stdout, $stderr) = run_command([ 'pg_walsummary', '-i', $filename ]);
like($stdout, qr/FORK main: block 0$/m, "stdout shows block 0 modified");
is($stderr, '', 'stderr is empty');
+note_wal_summary_dir("after pg_walsummary run", $node1);
done_testing();
+
+# XXX. Temporary debugging code.
+sub note_wal_summary_dir
+{
+ my ($flair, $node) = @_;
+
+ my $wsdir = sprintf "%s/pg_wal/summaries", $node->data_dir;
+ my @wsfiles = grep { $_ ne '.' && $_ ne '..' } slurp_dir($wsdir);
+ note("$flair pg_wal/summaries has: @wsfiles");
+}