Re: pg_config, pg_service.conf, postgresql.conf ....

From: "Mark Woodward" <pgsql(at)mohawksoft(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, kleptog(at)svana(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_config, pg_service.conf, postgresql.conf ....
Date: 2006-02-21 19:49:18
Message-ID: 24845.216.145.49.15.1140551358.squirrel@mail.mohawksoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> "Mark Woodward" <pgsql(at)mohawksoft(dot)com> writes:
>>> pg_config --sysconfdir
>
>> Hmm, that doesn't show up with pg_config --help.
>
> It's in 8.1.
>
>> One of my difficulties with PostgreSQL is that there is no
>> "standardized"
>> location for where everything is located, i.e. self documenting. If you
>> know that "/usr/local/pgsql/etc/pg_service.conf" will contain a list of
>> services, that is really awesome.
>
> I can't see a use-case for this at all, certainly not one that would
> override the reasons why there isn't a standardized location already.
> If we tried to force this to happen, it would
> * break building temp installations without root, because you'd
> not be able to list the installation in the central file
> * get modified by packagers to fit their ideas of filesystem
> layout, hence the "standard" location would be no such thing
>
> The concept really only works for one root-made installation on a single
> filesystem layout, and in that situation you hardly need it anyway,
> because you already know where the database is gonna be (eg with RPM
> installations it's gonna be /var/lib/pgsql/data).
>
> I don't see any plausibility to the concept of a configuration file that
> is in a more predictable place than the database itself is. I certainly
> don't see any plausibility to the idea that we're going to be able to
> force such a file to exist and be accurate in the face of admin
> errors/oversights, which is basically the situation you are presenting
> as the use-case.

I think the fact that you can't enforce a standardized paradigm does not
mean you can't offer one.

A file, be it pg_services.conf, or something new like pg_clusters.conf or
pg_servers.conf, is very useful.

Maybe you haven't had to manage an absurdly large number of systems that
have grown/changed over years. Systems come and go, mounting points,
/vol01, /vol02, /raid0, /raid1, etc. have their own convention.

As a guy who administers a lot of systems, sometimes over the span of
years, I can not understate the need for "a" place for the admin to find
what databases are on the machine and where they are located.

Your assertion that this file would "only works for one root-made
installation on a single filesystem layout" totally misses the point. The
point is that me, a consultant, could find where the database is, easily.
Given a large system, say it has 3 or 4 separate databases on it. How do
you know which is what?

/usr/local/pgsql/etc/pg_servers.conf >>>

#[SERVERNAME]
#DATADIR=LOC
#PORT=PORT
#..

[GEO]
DATADIR=/RAID1/pg80
PORT=5433
USER=postgres

[IMCDDS]
DATADIR=/home/orourke/pg80
PORT=5434
USER=orourke

[SITE]
DATADIR=/home/agarn/pg80
PORT=5432
USER=agarn

<<<<<<<<<<<

You get the idea.

This in no way removes existing functionality, but it provides a utility
where an admin can standarize their database installations.

pg_ctl startall

Could start all the database server processes in the config file. Can you
imagine the aggrevation of trying to find all this? If you've long
forgoten where any of this is?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2006-02-21 20:16:58 Re: pg_config, pg_service.conf, postgresql.conf ....
Previous Message Magnus Hagander 2006-02-21 19:42:17 Re: windows / initdb oddness