PostgreSQL
TMA-POSTGRES-3.1.8
Ensure the maximum log file lifetime is set correctly
RendahLevel 1Tinjauan manualpostgres
Deskripsi
When logging_collector is enabled, the log_rotation_age parameter determines the maximum lifetime of an individual log file (depending on the value of log_filename). After this many minutes have elapsed, a new log file will be created via automatic log file rotation.
Cara pemeriksaan
Metode audit: Tinjauan manual
Rekomendasi ini tidak dapat diperiksa secara otomatis. Pemindaian akan menampilkannya beserta petunjuk ini saat Anda memberikan opsi --include-manual.
Run SHOW log_rotation_age; (default 1d) and confirm the value matches your logging policy for maximum log file lifetime.
Cara perbaikan
Metode perbaikan: Panduan atau patch infrastruktur
ALTER SYSTEM SET log_rotation_age = '1h'; (example) then SELECT pg_reload_conf();
Properti
- Sistem operasi
- Apa saja
- Tag
- postgresdatabaseloggingmanual
- Referensi
- CIS PostgreSQL 18 Benchmark v1.0.0 - 3.1.8 Ensure the maximum log file lifetime is set correctly