Connect OpenTG to ChatGPT or Claude in 60 seconds

Try it

PostgreSQL in Docker for Production: Complete Guide Running PostgreSQL in Docker for production requ

Computer Science and Programming

Computer Science and Programming

@computer_science_and_programming

Channel specialized for advanced topics of: * Artificial intelligence, * Machine Learning, * Deep Learning, * Computer Vision, * Data Science * Python Admin: @otchebuch Memes: @memes_programming Ads: @Source_Ads, https://telega.io/c/computer_science

138,642 subscribers
Open in Telegram
PostgreSQL in Docker for Production: Complete Guide
Running PostgreSQL in Docker for production requires overriding several Docker defaults that conflict with Postgres internals. Starting with PostgreSQL 18, the official image moved PGDATA into version-specific subdirectories and changed the volume mount target to /var/lib/postgresql instead of /var/lib/postgresql/data. Docker's default 64 MB /dev/shm limit can cause queries to fail under real load, so shm_size should be set to 1gb or higher. The default 10-second SIGTERM-to-SIGKILL window can kill Postgres mid-checkpoint, so stop_grace_period should be raised to 60 or 120 seconds. PgBouncer in transaction pooling mode should sit in front of Postgres to absorb connection bursts, keeping max_connections around 100-150. Backups should use pg_dump -Fc or continuous WAL archiving with pgBackRest or WAL-G, never raw file copies of a running PGDATA directory.
Open post in Telegram