Skip to content

Commit 75a47b6

Browse files
Change debug printing to log filename
When restarting the cluster fails the code introduced in 3377497 printed the full log contents to aid debugging. For cases when the logfile is large this adds unnecessary overhead. Reduce to printing the logfile path instead. Reported-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/20240406214439.2n4zf2w7ukhf7dsy@awork3.anarazel.de
1 parent 626603d commit 75a47b6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/perl/PostgreSQL/Test/Cluster.pm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -951,8 +951,8 @@ sub start
951951

952952
if ($ret != 0)
953953
{
954-
print "# pg_ctl start failed; logfile:\n";
955-
print PostgreSQL::Test::Utils::slurp_file($self->logfile);
954+
print "# pg_ctl start failed; see logfile for details: "
955+
. $self->logfile . "\n";
956956

957957
# pg_ctl could have timed out, so check to see if there's a pid file;
958958
# otherwise our END block will fail to shut down the new postmaster.
@@ -1090,8 +1090,8 @@ sub restart
10901090

10911091
if ($ret != 0)
10921092
{
1093-
print "# pg_ctl restart failed; logfile:\n";
1094-
print PostgreSQL::Test::Utils::slurp_file($self->logfile);
1093+
print "# pg_ctl restart failed; see logfile for details: "
1094+
. $self->logfile . "\n";
10951095

10961096
# pg_ctl could have timed out, so check to see if there's a pid file;
10971097
# otherwise our END block will fail to shut down the new postmaster.

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