3 ms·
Can you deploy Postgres by simply linking it into your executable?
by qznc 8y ago
Can you deploy Postgres by simply linking it into your executable?
- ngrilly 8y agoNo you can't. But you can deploy the PostgreSQL executable along your app executable, and run it as a "sidecar" process, using a Unix-domain socket to let your app communicate with the PostgreSQL server, and setup PostgreSQL to store the database files in a location specific to your app, instead of a system global location. It's a bit unusual, but it's possible, and PostgreSQL command line makes this relatively easy.
- lmm 8y agoYes, though it's a less common configuration and so a bit fiddly and underdocumented.
- ngrilly 8y agoAs far as I know, there is no way to link PostgreSQL as a library in another executable. At least, nothing supported by the official PostgreSQL project. Even MySQL, which used to be available as an embedded library, got rid of this, feature a long time ago. Do you have any link to this "underdocumented" feature?