Mastering PostgreSQL 18+ in Docker: A Complete Guide to the New Data Directory Structure
PostgreSQL 18 introduced a fundamental shift in how the official Docker image manages data directories. This change caught many developers off guard, especially those accustomed to the long-standing /var/lib/postgresql/data mount point. If you upgraded to PostgreSQL 18+ and suddenly saw warnings about “old-style data directories,” you'