Re: [HACKERS] Configuration include directory

2012-09-25 Thread Heikki Linnakangas
On 24.09.2012 22:13, Gavin Flower wrote: On 25/09/12 02:41, Heikki Linnakangas wrote: Multiple files within an include directory are processed in filename order. The filenames are ordered by C locale rules, ie. numbers before letters, and uppercase letters before lowercase ones. Even I can und

Re: [HACKERS] Configuration include directory

2012-09-24 Thread Noah Misch
On Thu, Sep 20, 2012 at 02:10:58PM -0700, Selena Deckelmann wrote: > The only thing I didn't do that Noah suggested was run pgindent on > guc-file.l. A cursory search did not reveal source compatible with my > operating system for 'indent'. If someone points me to it, I'd happily > also comply with

Re: [HACKERS] Configuration include directory

2012-09-24 Thread Gavin Flower
On 25/09/12 02:41, Heikki Linnakangas wrote: On 24.09.2012 17:24, Tom Lane wrote: Heikki Linnakangas writes: This seems pretty much ready to commit. One tiny detail that I'd like to clarify: the docs say: Multiple files within an include directory are ordered by an alphanumeric sorting, so

Re: [HACKERS] Configuration include directory

2012-09-24 Thread Heikki Linnakangas
On 24.09.2012 17:24, Tom Lane wrote: Heikki Linnakangas writes: This seems pretty much ready to commit. One tiny detail that I'd like to clarify: the docs say: Multiple files within an include directory are ordered by an alphanumeric sorting, so that ones beginning with numbers are consider

Re: [HACKERS] Configuration include directory

2012-09-24 Thread Tom Lane
Heikki Linnakangas writes: > This seems pretty much ready to commit. One tiny detail that I'd like to > clarify: the docs say: >> Multiple files within an include directory are ordered by an alphanumeric >> sorting, so that ones beginning with numbers are considered before those >> starting wi

Re: [HACKERS] Configuration include directory

2012-09-24 Thread Heikki Linnakangas
On 21.09.2012 00:10, Selena Deckelmann wrote: Hello! I've spent a little time with this patch and have attached revision 6. Thanks, Noah, for a fantastically detailed review. The only thing I didn't do that Noah suggested was run pgindent on guc-file.l. A cursory search did not reveal source

Re: [HACKERS] Configuration include directory

2012-09-20 Thread Selena Deckelmann
Hello! I've spent a little time with this patch and have attached revision 6. Thanks, Noah, for a fantastically detailed review. The only thing I didn't do that Noah suggested was run pgindent on guc-file.l. A cursory search did not reveal source compatible with my operating system for 'indent'.

Re: [HACKERS] Configuration include directory

2011-12-13 Thread Greg Smith
On 12/13/2011 03:22 PM, Peter Eisentraut wrote: 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. Right, and that's gone now; latest update matches the regular include b

Re: [HACKERS] Configuration include directory

2011-12-13 Thread Greg Smith
On 12/13/2011 01:28 PM, Noah Misch wrote: ! ! Another possibility for this same sort of organization is to create a ! configuration file directory and put this information into files there. ! Other programs such asApache use a !conf.d directory for this purpose. And using num

Re: [HACKERS] Configuration include directory

2011-12-13 Thread Peter Eisentraut
On tis, 2011-11-15 at 23:53 -0500, Greg Smith wrote: > -Called by specifying "includedir ". 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

Re: [HACKERS] Configuration include directory

2011-12-13 Thread Noah Misch
On Mon, Dec 12, 2011 at 01:34:24PM -0500, Greg Smith wrote: [various things I agree with] > -Don't bother trying to free individual bits of memory now that it's all > in the same context. Saves some lines of code, and I do not miss the > asserts I am no longer triggering. In the postmaster,

Re: [HACKERS] Configuration include directory

2011-12-12 Thread Greg Smith
On 12/12/2011 01:34 PM, Greg Smith wrote: You can see a snapshot of the new doc page I built at http://http://www.westnet.com/~gsmith/config-setting.html One minute past send note on brain fade: this section include '00shared.conf' include '01memory.conf' include '02server.conf' Was a pasto

Re: [HACKERS] Configuration include directory

2011-12-12 Thread Greg Smith
Attached is an update to my earlier patch. This clears my own bug, usability concerns, and implementation ideas list on this one. There's full documentation on this now, including some suggested ways all these include features might be used. Since there's so much controversy around the way I

Re: [HACKERS] Configuration include directory

2011-12-07 Thread Marti Raudsepp
On Wed, Nov 16, 2011 at 06:53, Greg Smith wrote: > -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] I'd suggest also excluding hidden files -- files that start

Re: [HACKERS] Configuration include directory

2011-12-07 Thread Greg Smith
On 11/17/2011 11:03 AM, Tom Lane wrote: So as long as the include-directory code path doesn't interfere with tracking that nesting depth, I don't think it needs any extra protection against include-the-same-directory. That was the theory in Magnus's original patch, and I don't believe anyt

Re: [HACKERS] Configuration include directory

2011-12-05 Thread Noah Misch
Hi Greg, On Tue, Nov 15, 2011 at 11:53:53PM -0500, Greg Smith wrote: > Two years ago Magnus submitted a patch to parse all the configuration > files in a directory. After some discussion I tried to summarize what I > thought the most popular ideas were for moving that forward: > > http://arch

Re: [HACKERS] Configuration include directory

2011-11-17 Thread Tom Lane
Alvaro Herrera writes: > Excerpts from Tom Lane's message of mié nov 16 22:52:35 -0300 2011: >> (Do we guard against recursive inclusion via plain old include? If >> not, maybe this isn't worth worrying about.) > Yes, we do > FATAL: could not open configuration file "foo.conf": maximum nestin

Re: [HACKERS] Configuration include directory

2011-11-17 Thread Alvaro Herrera
Excerpts from Tom Lane's message of mié nov 16 22:52:35 -0300 2011: > (Do we guard against recursive inclusion via plain old include? If > not, maybe this isn't worth worrying about.) Yes, we do FATAL: could not open configuration file "foo.conf": maximum nesting depth exceeded -- Álvaro H

Re: [HACKERS] Configuration include directory

2011-11-16 Thread Tom Lane
"Andrew Dunstan" writes: > On Wed, November 16, 2011 6:45 pm, Greg Jaskiewicz wrote: >> What will happen if I specify: >> includedir './' > I would vote for it only to handle plain files (possibly softlinked) in > the named directory. I think Greg's point is that that would lead to again reading

Re: [HACKERS] Configuration include directory

2011-11-16 Thread Andrew Dunstan
On Wed, November 16, 2011 6:45 pm, Greg Jaskiewicz wrote: > > On 16 Nov 2011, at 04:53, Greg Smith wrote: >> >> -Called by specifying "includedir ". No changes to the >> shipped postgresql.conf yet. >> -Takes an input directory name > Very useful idea. > > What will happen if I specify: > > includ

Re: [HACKERS] Configuration include directory

2011-11-16 Thread Greg Jaskiewicz
On 16 Nov 2011, at 04:53, Greg Smith wrote: > > -Called by specifying "includedir ". No changes to the shipped > postgresql.conf yet. > -Takes an input directory name Very useful idea. What will happen if I specify: includedir './' Ie, what about potential cyclic dependency. -- Sent via

[HACKERS] Configuration include directory

2011-11-15 Thread Greg Smith
Two years ago Magnus submitted a patch to parse all the configuration files in a directory. After some discussion I tried to summarize what I thought the most popular ideas were for moving that forward: http://archives.postgresql.org/pgsql-hackers/2009-10/msg01452.php http://archives.postgresq