Re: Daniel Kahn Gillmor 2016-11-10 <[email protected]>
> 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.

Hi,

PG is not going to be an embedded database, so there will never be
something like a libpostgresql that you could link to and have the DB
"inside" your program. It will always be a (set of) separate
processes. Which means you'll need infrastructure to "boot" it.

postgresql-common supports "user clusters", i.e. you can point
PG_CLUSTER_CONF_ROOT to some place where the config should be, and
also ask for the data directory to be elsewhere. I haven't tested how
compatible this is with "user" systemd instances, but it's probably
not too hard to get it running. (See pg_wrapper(1).)

Also, I'm not sure why you would want to avoid the dependency on
postgresql-common, if you don't want the service files or pg_*cluster,
just don't use it? (If you want to avoid the "main" cluster to be
created on postgresql-N.N install, add "create_main_cluster = false"
to /etc/postgresql-common/createcluster.conf before installing the package.)

I'm not sure this answers all of your questions, but before I'm
answering everything from the wrong perspective, does this address
your use case?

Christoph

_______________________________________________
Pkg-postgresql-public mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-postgresql-public

Reply via email to