I'm working on migrating a PG cluster from PG 13.18 to 17.5 on Windows Server 2019 I'm using the community build of PG 17.5 from EDB. I've completed the migration using pg_upgrade.exe I've updated the default postgresql.conf that was created by initdb with settings from my PG13.18 instance. Logging is configured exactly the same and it's running on the same machine, same user.
The PG 17.5 server starts and runs but I don't see messages created by pg_ctl in the stderr logs (that I see with 13.18) such as:
- database system is shut down
- received SIGHUP, reloading configuration files
However I do see these messages in the logs
- 2025-06-06 09:59:08.718 EDT [26740] [] LOG: shutting down
- 2025-06-06 09:59:08.738 EDT [26740] [] LOG: checkpoint starting: shutdown immediate
What can I try to make pg_ctl output appear on my log files?
Edit: the issue can be reproduced only when PG is started as a windows service using "net start" or in the Services administration tool. The issue cannot be reproduced if PG is started with "pg_ctl start" .
Edit 2: postres.conf logging section, non-default settings
log_destination = 'stderr'
logging_collector = on
log_directory = 'pg_log'
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
log_file_mode = 0640
log_rotation_age = 1d
log_min_messages = info
log_min_duration_statement = 30000
log_checkpoints = on
log_connections = on
log_disconnections = on
log_line_prefix = '%m [%p] [%a] '