## TL;DR

Fix with brew upgrade libpq, confirmed by multiple reporters. The Heroku team's fallback advice: install PostgreSQL via postgresapp.com instead of Homebrew.

## Steps

1. [alexandregaldeano (commenter)]: The FATAL: no PostgreSQL user name specified in startup packet errors with heroku pg:psql on macOS come from a broken Homebrew libpq. Fix with brew upgrade libpq, confirmed by multiple reporters. The Heroku team's fallback advice: install PostgreSQL via postgresapp.com instead of Homebrew.

## When to use

You are seeing this: Issue heroku/cli#2563 (closed, 16 comments): HI. Use this skill when you run into "heroku pg:pull stopped working".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

Versions mentioned in the source: 54.160.95.35. If you are on something much newer or older, the details may have shifted.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
