Hi Christoph--

On Fri 2016-11-11 17:48:53 +0900, Christoph Berg wrote:
> 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.

right, i don't want an embedded database, i want a long-running process,
and i recognize that'll need some independent infrastructure to
supervise the service.

> 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).)

Thanks for these pointers, i wasn't aware of these particular details.
i'll look into them, and see if i can cobble something together that
takes advantage of the nice supervision work that the pkg-postgresql
team has already done.

> 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.)

hm, this file is actually part of postgresql-common itself, so it's not
as simple as dropping that one line in an empty file.

there are two reasons to want to avoid the system service:

 0) disk space taken up by the cluster
 
 1) extra unneeded running processes (both in terms of system resources
    and potential security risks)

if you don't care about 0, maybe it'd be possible to just mask the
expected service before package installation:

    systemctl mask postgresql@9.6-main.service

Thanks for the pointers, i think this gives me enough to chew on for the
moment.  These suggestions don't really help with minimizing the
dependency chain, of course, but that sort of "postgresql-light" rebuild
might not be worth the effort.

      --dkg

Attachment: signature.asc
Description: PGP signature

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

Reply via email to