Content-Length: 285098 | pFad | http://github.com/postgrespro/postgres/commit/75a47b6a0dc4a235307e1acd1a6b3845cb881e55

F2 Change debug printing to log filename · postgrespro/postgres@75a47b6 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/75a47b6a0dc4a235307e1acd1a6b3845cb881e55

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy