Closed Pyr0Texn1c closed 7 months ago
pgAgent can only create log files owned by the user it runs as - it doesn't have any code to try to write logs as a different user. You should check the systemd unit file and logrotate (or whatever you are using) are configured appropriately.
There is indeed the logrotate rule for pgagent logfile. It seems to be created by installation scriptlet when installing from pgdg16 repo. Thanks for the hint!
pgagent service is running under postgres user account, but logfile (/var/log/pgagent_16.log) is created with ownership of pgagent:pgagent after rotation. pgagent.txt