Postgres stops logging entries to /storage/db/pgdata/pg_log/postgresql.csv on the vRA appliance
book
Article ID: 336961
calendar_today
Updated On:
Products
VMware Aria Suite
Issue/Introduction
Symptoms: Postgres stops logging entries to /storage/db/pgdata/pg_log/postgresql.csv on the vRA appliance.
Environment
VMware vRealize Automation 7.4.x
Cause
Logrotate settings cause /storage/db/pgdata/pg_log/postgresql.csv to be overwritten with a new file having the same name, but a different inode number, than the original. The postgres logging facility writes to the postgresql.csv log file based on the inode number rather than the name, so it can no longer append to the original file.
Resolution
To resolve this issue:
Note: Execute the below steps on all vRA appliances in the cluster.
Run the command to Switch to the postgres user: su - postgres
Start psql:
psql vcac
Execute SQL commands to reset logging:
alter system set log_truncate_on_rotation = on; select pg_reload_conf(); select pg_rotate_logfile(); alter system reset log_truncate_on_rotation; select pg_reload_conf();