Lamar Owen wrote: > > First, a few conclusions: > > > We can't use /var/run because we need the postmaster to create > > those, and it isn't root. > > It isn't without precedent to have a directory under /var/run. Maybe > /var/run/postgresql. Under this one could have a uniquely named pid file. I > say uniquely named so that multiple postmasters could run. Naming those > files could be fun. /var/run/postgresql would be owned by the postmaster run > user. This of course requires root to install -- but would be completely > optional.
But how do you handle the default then, where you have postmaster.pid in /data? Do we rename it to postmaster.pid.5432 so it can sit in /var/run/postgresql alone with other backends? Another issue is that pg_ctl looks at that file, so moving it around is going to be tricky. Also, this brings up a new issue that pg_ctl all of a sudden can't just look at $PGDATA but must instead grope through postgresql.conf to find the data directory location. That could be interesting. Of course, it can still supply the /data path on the command line, but if we use only $PGCONFIG, we would need to have it find /data automatically from postgresql.conf. > > OK, first, we keep postmaster.pid and postmaster.opts in /data. We > > can't put them in /var/run, and /data seems like the best spot for them. > > Can we make that configurable? The default in pgdata is fine; just having the > option is good. Basically, I am saying that unless someone wants to use this configurability, it is going to cause code confusion so it is best avoided. ` > Yes. I'm thinking along the lines of this sort of structure: > /etc > |---postgresql > |----- name of postmaster one (unique ID of some kind) > |----- name of postmaster two > . > . > > Not difficult. Yes, that would work easily. > > We can also firm up stuff in 7.5 by removing PGDATA and -D, and perhaps > > removing the other duplicate postmaster flags that have postgresql.conf > > entries. > > Now I really _like_ this idea. By removing it to 7.5, and therefore > deprecating it in 7.4, this brings best practice into effect. > > However, at the same time, I wouldn't be opposed to leaving them in place, > either, for backwards compatibility. The problem is that we would be having too many ways to specify the /data directory. I am now wondering if we even want pg_hba_dir and pg_ident_dir. Seems we can assume they are in the same directory as postgresql.conf. That leaves only data_dir as new for postgresql.conf. -- Bruce Momjian | http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org