Re: [HACKERS] initdb change

2008-08-26 Thread Andrew Dunstan
Robert Treat wrote: 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 scen

Re: [HACKERS] initdb change

2008-08-26 Thread Robert Treat
On Monday 25 August 2008 14:05:21 Joshua Drake wrote: > On Mon, 25 Aug 2008 13:56:16 -0400 > > Andrew Dunstan <[EMAIL PROTECTED]> wrote: > > > That is what I was suggesting. > > > > Why should the xlog directory be treated specially? > > Consider the following: > > mount /dev/sda1 /var/lib/pgsql >

Re: [HACKERS] initdb change

2008-08-25 Thread Joshua Drake
On Mon, 25 Aug 2008 13:56:16 -0400 Andrew Dunstan <[EMAIL PROTECTED]> 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 /

Re: [HACKERS] initdb change

2008-08-25 Thread Andrew Dunstan
Joshua Drake wrote: Is there some reason why initdb shouldn't just Do The Right Thing™ when it finds an empty extant $PGDATA/pg_xlog directory that passes the same tests an empty extant $PGDATA would? That is what I was suggesting. Why should the xlog directory be treated speci

Re: [HACKERS] initdb change

2008-08-25 Thread Joshua Drake
On Mon, 25 Aug 2008 10:12:03 -0700 David Fetter <[EMAIL PROTECTED]> wrote: > > /var/lib/pgsql/data/ exists but is empty you can initdb within that > > directory. However if there is anything in it you can not. You are > > asking that if pg_xlog exists but is empty that we still be able to > > use

Re: [HACKERS] initdb change

2008-08-25 Thread David Fetter
On Mon, Aug 25, 2008 at 09:54:26AM -0700, Joshua D. Drake wrote: > On Mon, 25 Aug 2008 09:42:21 -0700 > David Fetter <[EMAIL PROTECTED]> wrote: > > > > We either need to provide a way to initialize it at initdb, allow > > > xlogs to be in table space or add a GUC for the location. > > > > There's

Re: [HACKERS] initdb change

2008-08-25 Thread Andrew Dunstan
David Fetter wrote: On Mon, Aug 25, 2008 at 11:48:29AM -0400, Tom Lane wrote: David Fetter <[EMAIL PROTECTED]> writes: While initdb allows you to choose a directory for transaction logs, it can't already exist, so it can't be in its usual place under $PGDATA. I'd like to propose that

Re: [HACKERS] initdb change

2008-08-25 Thread Heikki Linnakangas
David Fetter wrote: There's already a way to specify where xlogs should be via -X/--xlogdir. What that doesn't do is put the xlogdir where a DBA would naturally expect to find it. When that DBA doesn't find it in the place they expect, very bad knock-on decisions are likely to result. I don't

Re: [HACKERS] initdb change

2008-08-25 Thread Joshua Drake
On Mon, 25 Aug 2008 09:42:21 -0700 David Fetter <[EMAIL PROTECTED]> wrote: > > We either need to provide a way to initialize it at initdb, allow > > xlogs to be in table space or add a GUC for the location. > > There's already a way to specify where xlogs should be via > -X/--xlogdir. Sorry sho

Re: [HACKERS] initdb change

2008-08-25 Thread David Fetter
On Mon, Aug 25, 2008 at 09:29:03AM -0700, Joshua D. Drake wrote: > On Mon, 25 Aug 2008 09:04:01 -0700 > David Fetter <[EMAIL PROTECTED]> wrote: > > > > > When -X is set to "existing", it would check whether pg_xlog > > > > is a directory and the only thing in $PGDATA. One way to do > > > > that i

Re: [HACKERS] initdb change

2008-08-25 Thread Joshua Drake
On Mon, 25 Aug 2008 09:04:01 -0700 David Fetter <[EMAIL PROTECTED]> wrote: > > > When -X is set to "existing", it would check whether pg_xlog is a > > > directory and the only thing in $PGDATA. One way to do that is to > > > add a new return code to check_data_dir() and a new branch of the > > >

Re: [HACKERS] initdb change

2008-08-25 Thread David Fetter
On Mon, Aug 25, 2008 at 11:48:29AM -0400, Tom Lane wrote: > David Fetter <[EMAIL PROTECTED]> writes: > > While initdb allows you to choose a directory for transaction > > logs, it can't already exist, so it can't be in its usual place > > under $PGDATA. I'd like to propose that this be allowed by

Re: [HACKERS] initdb change

2008-08-25 Thread Joshua Drake
On Mon, 25 Aug 2008 08:40:17 -0700 David Fetter <[EMAIL PROTECTED]> wrote: > Folks, > > While initdb allows you to choose a directory for transaction logs, it > can't already exist, so it can't be in its usual place under $PGDATA. > I'd like to propose that this be allowed by having an alternate

Re: [HACKERS] initdb change

2008-08-25 Thread Tom Lane
David Fetter <[EMAIL PROTECTED]> writes: > While initdb allows you to choose a directory for transaction logs, it > can't already exist, so it can't be in its usual place under $PGDATA. > I'd like to propose that this be allowed by having an alternate syntax > for the -X option, namely, "existing."

[HACKERS] initdb change

2008-08-25 Thread David Fetter
Folks, While initdb allows you to choose a directory for transaction logs, it can't already exist, so it can't be in its usual place under $PGDATA. I'd like to propose that this be allowed by having an alternate syntax for the -X option, namely, "existing." When -X is set to "existing", it would