Thread: Multiple central connection service files

Multiple central connection service files

From
Curt Tilmes
Date:
Moving database config descriptions into $PGSYSCONFDIR/pg_service.conf is great,
but for a large enterprise, we may have a bunch that are managed independently, it would be nice to have multiple of such files.

The convention that many utilities that use such a config file have adopted is allowing an additional
directory where more config sections are found, e.g.
$PGSYSCONFDIR/pg_service.conf.d/*

This would be in addition to pg_service.conf itself.

Optimal would be for it to silently ignore files which the user didn't have read permission, checking for the requested service only in readable files.

This would also make it a lot easier for me to map specific database service connection information into containers without putting everything all in one big file.

Another option, not nearly as useful as the other (but still better than a single file), would be to allow multiple files to be listed in $PGSERVICEFILE,

Best possible world would allow both.

What do you think?

Curt

Re: Multiple central connection service files

From
"David G. Johnston"
Date:
On Thu, Jan 11, 2018 at 9:23 AM, Curt Tilmes <curt@tilmes.org> wrote:
The convention that many utilities that use such a config file have adopted is allowing an additional
directory where more config sections are found, e.g.
$PGSYSCONFDIR/pg_service.conf.d/*

​I already do this via configuration management and just "cat * > ../pg_service.conf​" as part of an update trigger (more or less).  Having it built-in would indeed be nice.

David J.