Skip to content

Commit ff73600

Browse files
committed
Add output for postgresql.conf on node start fails
1 parent e61e05a commit ff73600

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

testgres/testgres.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,15 @@ def start(self, params={}):
424424
else:
425425
print("Log file not found: %s", log_filename)
426426

427+
conf_filename = os.path.join(self.data_dir, 'postgresql.conf')
428+
if os.path.exists(conf_filename):
429+
print("\npostgresql.conf:\n----")
430+
with open(conf_filename, 'r') as conffile:
431+
text = conffile.readlines()[-1]
432+
print(text)
433+
else:
434+
print("Configuration file not found: %s", conf_filename)
435+
427436
raise ClusterException("Couldn't start the new node")
428437

429438
self.working = True

0 commit comments

Comments
 (0)