PostgreSQL wire protocol
The PostgreSQL wire protocol, documented as the "frontend/backend protocol" in PostgreSQL's own manual, is the message format a client or driver uses to open a connection, authenticate, send queries and receive results over TCP, normally on port 5432, the port IANA registers for PostgreSQL. It's a protocol specific to PostgreSQL rather than an open, cross-database standard, which is why a MySQL or MongoDB driver can't speak to a PostgreSQL server directly. Because the protocol itself doesn't enforce where a server listens, PostgreSQL's security depends on two separate settings working together: listen_addresses, which controls which network interfaces the server binds to, and pg_hba.conf, which controls who may authenticate once a connection reaches it. PostgreSQL defaults to listening on localhost only, so a server reachable on 5432 from the internet means that default was deliberately changed.
By AdminKit team, Netbase JSC · Updated