-
Notifications
You must be signed in to change notification settings - Fork 42
Closed
Labels
Description
Describe the bug
Commands such as psql
and pg_dump
crash when connecting with TLS using openssl v3.2+. The error is:
pg_dump: error: connection to server at "<REDACTED URL>" (<REDACTED IP>), port <REDACTED PORT> failed: FATAL: no PostgreSQL user name specified in startup packet
connection to server at "<REDACTED URL>" (<REDACTED IP>), port <REDACTED PORT> failed: FATAL: no PostgreSQL user name specified in startup packet
pg_dump(62804,0x1d7ef1000) malloc: *** error for object 0x2a: pointer being freed was not allocated
pg_dump(62804,0x1d7ef1000) malloc: *** set a breakpoint in malloc_error_break to debug
Steps to reproduce
- Install openssl v3.2+ (using MacOS, I installed via homebrew)
- Install postgres via asdf-postgres
- attempt to connect to a secure postgres URL using a connection string with the username and password included in the URL
Expected behavior
A successful connection to the server (or a successful dump is using pg_dump
)
Additional context
A temporary workaround is downgrading to openssl 3.1.x. I have personally confirmed that this works (but introduces some other issues).
The PostgreSQL package for Homebrew (MacOS) had a similar issue that they patched:
There was also a thread on postgresql.org: SSL tests fail on OpenSSL v3.2.0
Their fix references compatibility issues with libpq
as well.
pelletencate