I am trying to run pg_dump (or even psql) over our postgresql server v13, with binaries from v13 and v16. Both don't work for me, but do work for my colleagues that are not on Mac, not sure if it's related to that.
When I try to run:
pg_dump -U grails --verbose --host=<host> --port=<port> --format=plain <db_name> > <target_file>
or even simple:
psql -U grails --host=.. --port=..
I get the following:
pg_dump: error: connection to server at "...", port ... failed: FATAL: no PostgreSQL user name specified in startup packet
connection to server at "...", port ... failed: FATAL: no PostgreSQL user name specified in startup packet
pg_dump(71055,0x1db08dec0) malloc: *** error for object 0x92: pointer being freed was not allocated
pg_dump(71055,0x1db08dec0) malloc: *** set a breakpoint in malloc_error_break to debug
[1] 71055 abort pg_dump --verbose --host=... --port=... -U grails --format=plain
The user name is clearly specified as parameter and my colleagues have no problem. The malloc errors are weird too. What might be happening?