A production Postgres server in Bucharest went down with "could not connect to server: Connection refused" - here's exactly how we found the cause and fixed it, step by step.
If you've ever seen this error:
psql: could not connect to server: Connection refused
Is the server running on host "..." and accepting TCP/IP connections on port 5432?
...this video walks through the real debugging process: checking if Postgres was actually running, confirming it was listening on the right port, going through pg_hba.conf, - the same checklist you'd want to run through in an SRE/DevOps interview if asked "how do you debug a database connection failure."
Timestamps:
0:00 The problem — server in Bucharest, Postgres unreachable
01:00 Checking if Postgres is running
02:00 pg_hba.conf walkthrough
03:40 Root cause and fix
05:00 command discussion
Github link : will be updated
Part of the LeetCode for DevOps series - real production-style problems, solved on camera, for people prepping for DevOps/SRE interviews.
#postgresql #devops #sre