Port 5432: What's Using It and Is It Safe to Kill?
Port 5432 is the default PostgreSQL port. Here's what listens on it on a Mac, whether it's safe to stop, and how to find it.
Port 5432 is the default port for PostgreSQL. If it’s in use on your Mac, you have a Postgres server running, almost always a local one for development.
What typically listens on port 5432
- PostgreSQL: The default server port. Homebrew’s
postgresqlformula, Postgres.app, and Docker images all use it. - Docker and dev environments: Containers map Postgres to 5432 on the host.
- Connection poolers: Tools like PgBouncer sometimes sit in front, though often on a different port.
By default Postgres binds to 127.0.0.1, so it’s reachable from your Mac but not the network.
Is it safe to kill?
Stopping it won’t hurt macOS, but a database deserves a clean shutdown rather than a force-kill mid-write. Stop it properly:
brew services stop postgresql@16
Homebrew uses versioned formulae, so match the version you installed (run brew services list to check), or quit Postgres.app from the menu bar. Only kill the PID if the server is genuinely hung.
Is it suspicious?
On a machine where you do database work, no. It’s expected. Check two things: whether you meant to leave Postgres running (it can sit in the background using memory), and whether it’s bound to localhost only. A 5432 listener on your LAN IP means the database is exposed, which you rarely want on a laptop.
How to find what’s on port 5432 on macOS
lsof -i :5432
To stop a stuck instance by PID:
kill $(lsof -ti :5432)
Use a plain kill (SIGTERM) first so Postgres can shut down cleanly. Reserve kill -9 for a server that won’t respond.
Portie shows port 5432 alongside the postgres process in its live view, so you can confirm whether your database is running and which install owns the port.