[Pkg-postgresql-public] how to get a local/minimal per-user postgresql server on debian?

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Nov 10 17:08:05 UTC 2016

Hi Debian PostgreSQL folks--

Thre are some circumstances where i'd like to have the postgresql
binaries available without necessarily needing the system services
installed and started.  For example, i have a set of intermittent
short-lived processes that need to share long-lived state.  The state is
best described as a relational database, but i want all that state to be
under control of the unix user account that executes the processes, and
not under control of some other system user like postgres.

I'm imagining using initdb automatically as the unix user, and making
the new cluster listen on a unix-domain socket that is scoped to only
permit access from this user.

The binaries are all available in postgresql-X.Y packages, which doesn't
contain the system service -- so far so good :)

But at the moment, postgresql-9.6 Depends: postgresql-common, which does
contain the system service and the pg_*cluster commands.

Is there a way that i can just get the binaries for such a local build?

One possibility that occurs to me is a separate, minimally-configured
postgresql binary package (generated from the same source), named
something like postgresql-local-X.Y.  I'm imagining it wouldn't need to
support ldap, sasl, gssapi, krb5, or TLS, so the binary package should
have minimal dependencies (though it might need its own copy of libpq5
somehow to keep the deps down as well, i'm not sure how to best handle

Is this crazy-talk?  Is there a better way to achieve this goal? or
should i give up on trying to use psql in this constrained space and
encourage the projects i'm working on to use sqlite or something else

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 962 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-postgresql-public/attachments/20161110/0ff8b7bf/attachment.sig>

More information about the Pkg-postgresql-public mailing list