Hi, On Mon, 2005-10-10 at 07:35 +0200, Martin Pitt wrote: > - The name clients.d seems a bit misleading to me. OTOH I don't know > a much better name (restart.d perhaps); discussing the name as well > as the whole approach might be worth discussing on debian-devel. > > - There should be support for global hook directories in > /etc/postgresql/clients.d (or whatever name). > > It just came into my mind that this would perfectly fit to remove the > autovacuum special case from all the scripts and put them into such a > hook script instead. Nice :-) This at least makes "clients.d" misleading. I don't like "restart.d" too much because it's also used in start/stop. OTOH, using the generic name "init.d" is not too good, either.
That "init.d" just brought another thought to my mind: I'd currently start nagios twice on system restart given my simplistic "hook into start/stop": first it's started though "/etc/init.d/postgresql-7.4", then again through "/etc/init.d/nagios" (both of course really through /etc/rc3.d). So my idea works nicely for restart, but not really for system startup/shutdown. Perhaps we should _only_ hook into the "restart" case? (But then I think you would need the "start/stop" for your autovaccuum idea...) Another alternative would be to run "update-rc.d -f nagios remove". Perhaps what we really need is a more powerful concept for "/etc/init.d" which not just orders the components by name but has a concept of dependencies. However, I don't want this idea to be lost in the year-long discussions for "improved init.d". So perhaps the best approach is what we did so far (hooks into "start" and "stop"), plus docu including "run update-rc.d -f <xxx> remove". Or perhaps a script "pg_client <version> <client> <install|remove>" which does the "ln -s /etc/init.d/<client> /etc/postgresql/<version>; update-rc.d -f <client> remove" for install etc. (replace "client" which whatever you settle on). > > > - should the run-parts directory in the cluster dir instead? > > No, since these links are configuration files, they must be in /etc. > > > - when/where is the /etc/postgresql/7.4 directory created (so that I can > > add creating the clients.d directory)? > > pg_createcluster creates and populates the directory. Ok, will try to come up with a patch for that. Best, Norbert
signature.asc
Description: This is a digitally signed message part