Skip to content

Postgres compiled using asdf on Macos Sonoma OOMs when connecting to Heroku Postgres (and probably all RDS) #84

@pelletencate

Description

@pelletencate

Describe the bug

I don't exactly know what causes this, but whenever I try to connect to remote Heroku Postgres database with PostgreSQL built using asdf on macos Sonoma, it crashes with an "Out of Memory" error. (And if I use ruby's pg gem, it makes Ruby segfault, but that's probably out of scope). I have tried it with various versions of Postgres: 14.6, 14.10 and the very latest 16. I don't know if this is related to the recent update to OpenSSL.

The reason why I report this, however, is that I noticed that Homebrew's PostgreSQL - very same versions - do not have this problem. I looked at the small patch they apply to libpq (which you can find in both the PostgreSQL as the libpq formulas) and had asdf-postgres apply it to its source before building it. After having done this, the problem disappeared.

I'm quite invested in this issue and I would have made a PR, but I noticed the patches on Homebrew aren't identical between versions. Well, as far as I can tell based on my limited investigation, the patched lines are identical across versions but the line numbers differ. I'm not sure how to proceed, my knowledge of writing and applying patches is a bit too limited.

Steps to reproduce

  • Build postgres 14.6, 14.10 or 16@latest using asdf on macos sonoma with up to date dependencies installed using homebrew
  • Run a simple heroku postgres command such as heroku pg:ps

Expected behavior

Connection and execution without trobule

Observed behavior

psql: out of memory

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions