Does the existing arm32 build not work? I am going to presume not since you are talking about building an image. I don’t have my Endpoint running in front of me, but I thought it already had a package manager on it (apt?)
GHI would be the only one capable of compiling Postgres for endpoint now.
It’s possible for us mere mortals to build stuff like this, provided you don’t need GHI’s kernel root (can’t say whether postgress requires that)
The compiler issue is an easy enough one to fix. See: Calling native code on the Endpoint
I think there’s a much bigger issue, and that is one of mismatched scale. Postgres has a pretty big footprint and may not leave much of your board left over for doing anything else, if it fits at all.
Aside from being easier to work with at dev time, are there runtime use-cases that the more compact dbs can’t solve? That’s a rhetorical question, of course - you know your requirements.