PostgreSQL
What is Port 5432?
Port 5432 is the default port for PostgreSQL, the world's most advanced open-source relational database. Originally developed at UC Berkeley in the 1980s as POSTGRES and later renamed PostgreSQL, it has become the database of choice for many modern applications due to its robustness, standards compliance, extensibility, and advanced features. PostgreSQL supports ACID transactions, complex queries, JSON/JSONB data types, full-text search, PostGIS for geospatial data, and a rich extension ecosystem. Major companies including Apple, Instagram, Spotify, Reddit, and Twitch rely on PostgreSQL. Cloud providers offer managed PostgreSQL services — AWS RDS, Google Cloud SQL, Azure Database for PostgreSQL, and specialized providers like Supabase and Neon.
Common Uses
- Web application database backends
- Geospatial data with PostGIS extension
- Data warehousing and analytics
- Time-series data with TimescaleDB extension
- Enterprise application data storage
Technical Details
Copy-paste commands to check port 5432 (PostgreSQL) from your terminal
Test connectivity
nc -zv example.com 5432
curl -v --max-time 5 http://example.com:5432/
telnet example.com 5432
nmap -p 5432 -sV example.com
(echo > /dev/tcp/example.com/5432) 2>/dev/null && echo "open" || echo "closed"
Open port in firewall
sudo ufw allow 5432/tcp
sudo iptables -A INPUT -p tcp --dport 5432 -j ACCEPT
sudo firewall-cmd --permanent --add-port=5432/tcp && sudo firewall-cmd --reload
Security Considerations
Never expose PostgreSQL to the internet without proper controls. Configure pg_hba.conf to restrict connections by IP and authentication method. Use SSL/TLS for encrypted connections. Use strong passwords and scram-sha-256 authentication. Implement row-level security for multi-tenant applications. Enable audit logging with pgAudit. Regularly backup with pg_dump or pg_basebackup.
Popular Ports Reference
The most commonly used and referenced network ports