Thread: consistent naming of components
Hi all! I wanted to propose a possible "rationalization" of the PostgreSQL naming scheme, as briefly outlined below. The following suggestion may seem like a trivial improvement to some, but to me it is a matter of polish and consistency. One possible renaming / reorganization: (feedback encouraged!!!) change default account name postgres to pgsql change daemon name postmaster to pgsqld change client name psql to pgsql change data location /var/lib/pgsql/data to /var/pgsql move .conf files from /var/lib/pgsql/data to /etc/pgsql change all PG_xxx file names (PG_VERSION, /usr/bin/pg_xxx, etc) to pgsql_xxx change all postgresql* file names to pgsql* whatever else I have missed...:) I think this would be a very worthwhile improvement, but I don't know how others feel about this. It should make it easier for newbies to learn their way around and generally reduce confusion. Going a bit further in reorganization, if the config files always lived in an /etc/pgsql directory, then pgsqld (aka postmaster) could start with zero parameters and zero environment variables (true?), since it could get PGDATA and PGLIB type data, plus log file location, from the config files. This should simplify the init scripts as well, and generally make setup easier. Eventually, other environment variables (like the one passed to CREATE DATABASE name WITH LOCATION = 'location' where location is an environment variable) could be eliminated, so that all configuration information lived in /etc/pgsql conf files. I am a Unix/Linux novice, but this seems to make sense to me. What does everyone think? Rob PS Please forgive me in advance if this is not the correct mailing list to propose this on.
> change default account name postgres to pgsql > change daemon name postmaster to pgsqld > change client name psql to pgsql > change data location /var/lib/pgsql/data to /var/pgsql > move .conf files from /var/lib/pgsql/data to /etc/pgsql *coff* The more correct (ie. anything but linux) place to put conf files is /usr/local/etc/pgsql. And anyway - you can change the position of these files at compile time... Chris
"Robert Dyas" <rdyas@adelphia.net> writes: > [ rename and move just about everything in sight ] Sorry, but I don't think this is going to happen. We'd be breaking a heck of a lot of user applications, startup scripts, etc to achieve (IMHO) very little of value. Renaming psql->pgsql would alone break more user scripts than I care to think about. > change data location /var/lib/pgsql/data to /var/pgsql > move .conf files from /var/lib/pgsql/data to /etc/pgsql The present sources do not have any hardwired notion of where things should go. If you care to install things in those directories, you can --- but you won't get far insisting that everyone else should do likewise. Preferred filesystem organization varies across platforms. Even if it didn't, there are situations such as running multiple postmasters (eg, setting up a test version) in which some instances *must* have a nonstandard location. You might possibly be able to talk the RPM maintainer into changing his ideas of where the RPMs should install stuff --- but I believe he thinks he's following the Linux filesystem layout standard (FHS? forget what it's called exactly). In any case, breaking backwards compatibility won't be an easy sell. > Going a bit further in reorganization, if the config files always lived in > an /etc/pgsql directory, then pgsqld (aka postmaster) could start with zero > parameters and zero environment variables (true?), Again, see multiple-postmaster issue. AFAICT you are proposing to remove flexibility that is *necessary* for some people. (Like me ... I currently have three postmasters of different vintages running on this machine ...) regards, tom lane
Robert Dyas writes: > One possible renaming / reorganization: (feedback encouraged!!!) > > change default account name postgres to pgsql It's a little known secret, but there is no default account name! "postgres" is simply what most people seem to choose (but by no means all). The documentation might refer to "postgres" as well, but that's just to align with common usage. > change daemon name postmaster to pgsqld Most people don't start the postmaster directly anyway, so I don't see this as an improvement. > change client name psql to pgsql There are more clients than just psql. What's PgAccess' name going to be. psql is just the name of the program and it's hardwired into people's fingers. > change data location /var/lib/pgsql/data to /var/pgsql There is no default data location either. The /var/lib location is probably what the FHS folks dreamt up, but other platforms don't use it. > move .conf files from /var/lib/pgsql/data to /etc/pgsql As there is no default data location, these are just two arbitrary locations. > change all PG_xxx file names (PG_VERSION, /usr/bin/pg_xxx, etc) to pgsql_xxx More typing, longer file names, not pretty. > change all postgresql* file names to pgsql* The package is called PostgreSQL, so if anything, the change should be pgsql => postgresql. -- Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
Personally I see very little gain for lots of work and problems. But whatever is decided it'll be ok for me if I can still tell a postmaster on the command line where its base directory or global configuration file is and it finds everything else from there. Apache is almost there, need to edit the apachectl and init scripts and that's about it. The supplied Postgresql initstyle script kills all postmasters though :(. Cheerio, Link. At 10:52 PM 26-10-2001 -0400, Robert Dyas wrote: >Hi all! > >I wanted to propose a possible "rationalization" of the PostgreSQL naming >scheme, as briefly outlined below. The following suggestion may seem like a >trivial improvement to some, but to me it is a matter of polish and >consistency. > >One possible renaming / reorganization: (feedback encouraged!!!) > >change default account name postgres to pgsql >change daemon name postmaster to pgsqld >change client name psql to pgsql >change data location /var/lib/pgsql/data to /var/pgsql >move .conf files from /var/lib/pgsql/data to /etc/pgsql >change all PG_xxx file names (PG_VERSION, /usr/bin/pg_xxx, etc) to pgsql_xxx >change all postgresql* file names to pgsql* >whatever else I have missed...:) > >I think this would be a very worthwhile improvement, but I don't know how >others feel about this. It should make it easier for newbies to learn their >way around and generally reduce confusion. > >Going a bit further in reorganization, if the config files always lived in >an /etc/pgsql directory, then pgsqld (aka postmaster) could start with zero >parameters and zero environment variables (true?), since it could get PGDATA >and PGLIB type data, plus log file location, from the config files. This >should simplify the init scripts as well, and generally make setup easier. >Eventually, other environment variables (like the one passed to CREATE >DATABASE name WITH >LOCATION = 'location' where location is an environment variable) could be >eliminated, so that all configuration information lived in /etc/pgsql conf >files. > >I am a Unix/Linux novice, but this seems to make sense to me. What does >everyone think? > >Rob > >PS Please forgive me in advance if this is not the correct mailing list to >propose this on. > > >---------------------------(end of broadcast)--------------------------- >TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > >
I'll consider this dead. -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Saturday, October 27, 2001 1:12 PM To: Robert Dyas Cc: pgsql-hackers@postgresql.org Subject: Re: [HACKERS] consistent naming of components "Robert Dyas" <rdyas@adelphia.net> writes: > [ rename and move just about everything in sight ] Sorry, but I don't think this is going to happen. We'd be breaking a heck of a lot of user applications, startup scripts, etc to achieve (IMHO) very little of value. Renaming psql->pgsql would alone break more user scripts than I care to think about. > change data location /var/lib/pgsql/data to /var/pgsql > move .conf files from /var/lib/pgsql/data to /etc/pgsql The present sources do not have any hardwired notion of where things should go. If you care to install things in those directories, you can --- but you won't get far insisting that everyone else should do likewise. Preferred filesystem organization varies across platforms. Even if it didn't, there are situations such as running multiple postmasters (eg, setting up a test version) in which some instances *must* have a nonstandard location. You might possibly be able to talk the RPM maintainer into changing his ideas of where the RPMs should install stuff --- but I believe he thinks he's following the Linux filesystem layout standard (FHS? forget what it's called exactly). In any case, breaking backwards compatibility won't be an easy sell. > Going a bit further in reorganization, if the config files always lived in > an /etc/pgsql directory, then pgsqld (aka postmaster) could start with zero > parameters and zero environment variables (true?), Again, see multiple-postmaster issue. AFAICT you are proposing to remove flexibility that is *necessary* for some people. (Like me ... I currently have three postmasters of different vintages running on this machine ...) regards, tom lane