Skip to content

Commit 0b97551

Browse files
authored
chore(log): include pg_ctl options in the instance manager log (cloudnative-pg#6943)
This will help debugging the PostgreSQL shutdown process. Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
1 parent 918f9b0 commit 0b97551

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pkg/management/postgres/instance.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ func (instance *Instance) Shutdown(ctx context.Context, options shutdownOptions)
507507
"pgdata", instance.PgData,
508508
"mode", options.Mode,
509509
"timeout", options.Timeout,
510+
"pgCtlOptions", pgCtlOptions,
510511
)
511512

512513
pgCtlCmd := exec.Command(pgCtlName, pgCtlOptions...) // #nosec
@@ -621,8 +622,10 @@ func (instance *Instance) Reload(ctx context.Context) error {
621622
"reload",
622623
}
623624

624-
contextLogger.Info("Requesting configuration reload",
625-
"pgdata", instance.PgData)
625+
contextLogger.Info(
626+
"Requesting configuration reload",
627+
"pgdata", instance.PgData,
628+
"pgCtlOptions", options)
626629

627630
// Need to reload certificates if they changed
628631
if instance.primaryPool != nil {

0 commit comments

Comments
 (0)