Greg Smith <gsm...@gregsmith.com> writes: > On Mon, 26 Oct 2009, Greg Stark wrote: >> When scanning postgresql.conf.d we should follow the Apache/Debian >> standard of scanning only files which match a single simple hard-coded >> template.
> If the default glob pattern is *.conf, won't all those already be screened > out? I can see your point that letting it be adustable will inevitably > result in some fool one day writing a bad matching pattern that does grab > backup/lock files. But is that concern so important that we should limit > what people who know what they're doing are allowed to do? I'm with Greg Stark on this: let's just specify a directory name and hard-wire the filename pattern as *.conf. The use-case for anything else is at best tissue-thin and at worst counterproductive. More, AFAICS it is going to take us a substantial amount of code to do something more general. (We already touched on the question of whether glob(3) is portable, and even if it is, we have to consider the code that will need to be added to ensure it's cleaned up on error. A ReadDir loop around a strncmp call is no problem from that point of view, because we already have that infrastructure; but ensuring globfree() happens is another question.) > I object to the idea of dictating in this area because it just > encourages argument. I quite agree with that as a general principle, but I don't think that dictating the filename pattern is really limiting people in any discernible fashion. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers