Re: PostgreSQL configuration - Mailing list pgsql-hackers
From | pgsql@mohawksoft.com |
---|---|
Subject | Re: PostgreSQL configuration |
Date | |
Msg-id | 19050.24.91.171.78.1081826065.squirrel@mail.mohawksoft.com Whole thread Raw |
In response to | Re: PostgreSQL configuration (Tom Lane <tgl@sss.pgh.pa.us>) |
Responses |
Re: PostgreSQL configuration
|
List | pgsql-hackers |
> I just had a thought about this: seems like a big part of the objection > is the risk of specifying -C and -D that don't go together. Well, what > if they were the same switch? Consider the following simplification of > the proposed patch: I was really excited about this idea, then I thought about it, and while it would answer some of the issues I mean to address, I find myself a little disappointed that some of the functionality I wanted, i.e. multiple databases with the same configuration, was not possible. However, compromise is good. > > 1. Postmaster has just one switch, '-D datadir' with fallback to > environmental variable PGDATA, same as it ever was. I like this, I think, ... but it removes the posibility to run the same configuration with the same database. This scenario is one of my "best case" reasons why I think my patch is good, but, I think I can get 99% of what I'm looking for with my modification outlined at the bottom of this post. > > 2. The files that must be found in this directory are the configuration > files, namely postgresql.conf, pg_hba.conf, pg_ident.conf. (And any > files they include are taken as relative to this directory if not > specified with absolute path. We'll still add the #include facility > to postgresql.conf; the others have it already IIRC.) My patch *already* has this functionality if it is a directory. I agree with this, it was suggested (maybe even by you) over a year ago. [snip -- good stuff] Tom, this is great! I think we are almost there and I really appreciate your flexibility in view of my obstinance. :-) I like what you suggest, While I don't get the -D and -C functionality (which I don't use, but thought was cool), I think I would like to add one thing: postmaster -D /etc/postgres/postgresql.conf If the path specified is a config file, then "data_dir" MUST address a valid PostgreSQL data directory. So, here is (how I see) the logical breakdown of the feature: "postmaster -D /somedir/data" works as it always has, it points to the data dirtectory in which all the various config files live. If No "data_dir" is specified, then "/somedir/data" is assumed to be where base, pg_xlog, pg_clog, and etc. reside. If, however, "data_dir" is specified, the data oriented elements like "global," "base," "pg_clog," and "pg_xlog" are contained within that directory. (In the future, we may be able to specify these locations separately) If "postmaster -D /etc/postgresql.conf" points to a file, then that file MUST specify the location of "data_dir," "hba_conf," and "ident_conf." Like I said, while I don't get the convenience of combining "-D ..." and "-C ..." I do get most of what I'm asking for. If this works for all you guys, I'll submit a patch Wednesday.
pgsql-hackers by date: