PostgreSQL /etc/logrotate.d/postgresql-common

Authentic ๐Ÿ“‹ Debian 9 (Stretch) 11 lines

Compatibility

Currently viewing:
Debian 9 (Stretch)
Also compatible:
Debian 10 (Buster) Debian 11 (Bullseye) Debian 12 (Bookworm) Ubuntu 18.04 LTS (Bionic Beaver) Ubuntu 20.04 LTS (Focal Fossa) Ubuntu 22.04 LTS (Jammy Jellyfish) Ubuntu 24.04 LTS (Noble Numbat)
Different versions:

File Info

Size
11 lines
MD5
101326ef5d138998692ece35109ef1a2
SHA256
d79d7ccfd06bc621bdf50d608c68d0e3fed70bf8f3ce9e87bbbb2b1802fd3912

Quick Commands

curl:
curl https://exampleconfig.com/api/v1/config/original/101326ef5d138998692ece35109ef1a2?hint=postgresql-common
wget:
wget -O postgresql-common https://exampleconfig.com/api/v1/config/original/101326ef5d138998692ece35109ef1a2?hint=postgresql-common
/etc/logrotate.d/postgresql-common
/var/log/postgresql/*.log {
       weekly
       rotate 10
       copytruncate
       delaycompress
       compress
       notifempty
       missingok
       su root root
}

How to Install PostgreSQL

Alpine Linux

sudo apk add postgresql

Debian

sudo apt update && sudo apt install postgresql

Red Hat Enterprise Linux

sudo yum install postgresql17-server

Ubuntu

sudo apt update && sudo apt install postgresql

Configuration File Location

File Path
/etc/logrotate.d/postgresql-common
Directory
/etc/logrotate.d/
Significance
System-wide configuration directory
Description
Files in /etc/ contain system-wide configuration settings that affect all users.

Complete PostgreSQL Configuration Guide

What is postgresql-common?
Access the original 'postgresql-common' (postgresql.conf) configuration file from a fresh PostgreSQL installation on Debian 9 (Stretch). This is the exact default configuration that ships with the official PostgreSQL package, essential for database recovery, performance optimization, and understanding enterprise-grade settings.
Technical Details
Located at '/etc/logrotate.d/postgresql-common', this 11-line file controls shared buffers, WAL settings, autovacuum parameters, connection pooling, and query optimization. Powers some of the world's largest databases including Instagram, Spotify, and financial institutions processing millions of transactions daily.
Common Configuration Question
How do you configure PostgreSQL for optimal performance, high availability, and ACID compliance on Debian 9?
Why Use This Configuration?
This factory-default configuration includes advanced indexing, full-text search capabilities, and enterprise security features. Critical for database administrators, data engineers, and developers building scalable applications with complex queries.

Frequently Asked Questions

When should I use this postgresql-common file?

Use this original configuration file when you need to restore PostgreSQL to its default state after misconfiguration, during fresh installations, or as a baseline for customization. It's particularly useful for troubleshooting when your current config isn't working properly.

How do I restore PostgreSQL to default settings?

Download this file and replace your current configuration at /etc/logrotate.d/postgresql-common. Make sure to backup your existing configuration first, then restart the PostgreSQL service to apply the changes.

Is this postgresql-common file secure for production use?

This is the factory-default configuration that ships with PostgreSQL on Debian 9 (Stretch). While it provides a secure baseline, you should review and customize security settings based on your specific production requirements and compliance needs.

What's the difference between this and other OS versions?

This configuration is specifically from Debian 9 (Stretch). Different operating systems and versions may have slightly different default settings, security patches, or feature availability. Check the compatibility section above for other OS versions.

Can I use this configuration file for PostgreSQL troubleshooting?

Yes, this original configuration is excellent for troubleshooting. Compare it with your current settings to identify modifications that might be causing issues, or temporarily replace your config with this one to isolate problems.