Diagnostic step 1
Confirm ownership and permissions: chown -R postgres:postgres /var/lib/pgsql/archive and set directories to 750 or 755; ensure postgres can create files as the postgres user.
Generated Oct 26, 2026, 9:23:15 AM
Confirm ownership and permissions: chown -R postgres:postgres /var/lib/pgsql/archive and set directories to 750 or 755; ensure postgres can create files as the postgres user.
As postgres user, run the exact archive_command on a WAL file (su - postgres; /bin/bash -c "<archive_command> path/to/WAL") and observe return code and errors.
Check AppArmor/SELinux logs (journalctl, /var/log/audit/audit.log) and temporarily put profile in complain/permissive mode while testing.
Once archival succeeds for recent WAL, monitor pg_wal removal; if disk near full, add temporary disk and set archive_command to write to new location, restart archiving, then allow old WAL to be archived and removed.