Re: initdb change - Mailing list pgsql-hackers

From Robert Treat
Subject Re: initdb change
Date
Msg-id 200808261646.33893.xzilla@users.sourceforge.net
Whole thread Raw
In response to Re: initdb change  (Joshua Drake <jd@commandprompt.com>)
Responses Re: initdb change  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Monday 25 August 2008 14:05:21 Joshua Drake wrote:
> On Mon, 25 Aug 2008 13:56:16 -0400
>
> Andrew Dunstan <andrew@dunslane.net> wrote:
> > > That is what I was suggesting.
> >
> > Why should the xlog directory be treated specially?
>
> Consider the following:
>
> mount /dev/sda1 /var/lib/pgsql
> mount /dev/sdb1 /srv1/pgsql/pg_xlog (which has a link
> from /var/lib/pgsql/data/pg_xlog)
>
> initdb -D /var/lib/pgsql/data -X /var/lib/pgsql/data/pg_xlog
>
> Will fail; now you have multiple steps to get everything where it
> should be.
>
> > We don't do this
> > for any other subdirectory of PGDATA. The extra logic would be a
>
> Well the only other directory it would even matter for would be pg_clog
> (maybe). I grant that it is a very little feature that could be lived
> without.
>
> > nuisance and for no great gain in functionality that I can see.
>
> In an environment where you are provisioning many spindle machines over
> many differently mounts and raid configurations it could be useful. The
> question is; is it worth it? I don't know. I was just trying to
> understand exactly what David was talking about and offer some
> suggestions.
>

I would have thought the place you need this is where you have SA's who set up 
a machine, creating a $PGDATA and $PGDATA/xlog on seperate mountpoints where 
the postgres user has full rights to use those directories, but not create 
directies in those locations. In that scenario, the DBA couldn't create the 
directories if he wanted, so allowing the behavior to use an existing 
directory would be helpful. 

-- 
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Restartable signals 'n all that
Next
From: Andrew Dunstan
Date:
Subject: Re: initdb change