Re: Configuration include directory

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Greg Smith <greg(at)2ndQuadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Configuration include directory
Date: 2011-12-13 20:22:46
Message-ID: 1323807766.16048.6.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On tis, 2011-11-15 at 23:53 -0500, Greg Smith wrote:
> -Called by specifying "includedir <directory>". No changes to the
> shipped postgresql.conf yet.
> -Takes an input directory name
> -If it's not an absolute path, considers that relative to the -D option
> (if specified) or PGDATA, the same logic used to locate the
> postgresql.conf (unless a full path to it is used)
> -Considers all names in that directory that end with *.conf [Discussion
> concluded more flexibility here would be of limited value relative to
> how it complicates the implementation]
> -Loops over the files found in sorted order by name

> I can see some potential confusion here in one case. Let's say someone
> specifies a full path to their postgresql.conf file. They might assume
> that the includedir was relative to the directory that file is in.
> Let's say configfile is /etc/sysconfig/pgsql/postgresql.conf ; a user
> might think that "includedir conf.d" from there would reference
> /etc/sysconfig/pgsql/conf.d instead of the $PGDATA/conf.d you actually
> get. Wavering on how to handle that is one reason I didn't try
> documenting this yet, the decision I made here may not actually be the
> right one.

Well, the existing include directive works relative to the directory the
including file is in. If includedir works differently from that, that
would be highly confusing.

I would actually just extend "include" to accept wildcards instead of
inventing a slightly new and slightly different mechanism.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2011-12-13 20:27:03 Re: JSON for PG 9.2
Previous Message Greg Smith 2011-12-13 18:57:01 Re: logging in high performance systems.