Thread: Re: [PATCHES] xlog directory at initdb time

Re: [PATCHES] xlog directory at initdb time

From
Peter Eisentraut
Date:
Am Mittwoch, 27. Dezember 2006 02:56 schrieb Euler Taveira de Oliveira:
> This simple patch lets someone specifies the xlog directory at initdb
> time. It uses symlinks to do it, and create and/or set permissions at
> the directory as appropriate.

We already had this functionality in initdb a few versions ago.  Did you 
review why it was removed?
-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


Re: [PATCHES] xlog directory at initdb time

From
Tom Lane
Date:
Peter Eisentraut <peter_e@gmx.net> writes:
> Am Mittwoch, 27. Dezember 2006 02:56 schrieb Euler Taveira de Oliveira:
>> This simple patch lets someone specifies the xlog directory at initdb
>> time. It uses symlinks to do it, and create and/or set permissions at
>> the directory as appropriate.

> We already had this functionality in initdb a few versions ago.  Did you 
> review why it was removed?

The discussion thread seems to start here:

http://archives.postgresql.org/pgsql-hackers/2002-08/msg00306.php

As best I can tell the objections came from the fact that Thomas had
implemented it as a postmaster-start-time switch, which made it a
foot-gun because you could mistakenly start the postmaster with a
different XLOG than you were using before.  That would not apply to a
symlink-made-by-initdb approach.  All this is doing is formalizing
something we already suggest people do by hand...
        regards, tom lane


Re: [PATCHES] xlog directory at initdb time

From
Bruce Momjian
Date:
Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
> > Am Mittwoch, 27. Dezember 2006 02:56 schrieb Euler Taveira de Oliveira:
> >> This simple patch lets someone specifies the xlog directory at initdb
> >> time. It uses symlinks to do it, and create and/or set permissions at
> >> the directory as appropriate.
> 
> > We already had this functionality in initdb a few versions ago.  Did you 
> > review why it was removed?
> 
> The discussion thread seems to start here:
> 
> http://archives.postgresql.org/pgsql-hackers/2002-08/msg00306.php
> 
> As best I can tell the objections came from the fact that Thomas had
> implemented it as a postmaster-start-time switch, which made it a
> foot-gun because you could mistakenly start the postmaster with a
> different XLOG than you were using before.  That would not apply to a
> symlink-made-by-initdb approach.  All this is doing is formalizing
> something we already suggest people do by hand...

Right.  Thomas decided he didn't want to adjust the patch based on
community input, so the patch was removed.  It was one of the few cases
where I had to back out someone else's patch against their will.

--  Bruce Momjian   bruce@momjian.us EnterpriseDB    http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


Re: [PATCHES] xlog directory at initdb time

From
Casey Duncan
Date:
On Jan 2, 2007, at 7:18 AM, Tom Lane wrote:

> Peter Eisentraut <peter_e@gmx.net> writes:
>> Am Mittwoch, 27. Dezember 2006 02:56 schrieb Euler Taveira de  
>> Oliveira:
>>> This simple patch lets someone specifies the xlog directory at  
>>> initdb
>>> time. It uses symlinks to do it, and create and/or set  
>>> permissions at
>>> the directory as appropriate.
>
>> We already had this functionality in initdb a few versions ago.   
>> Did you
>> review why it was removed?
>
> The discussion thread seems to start here:
>
> http://archives.postgresql.org/pgsql-hackers/2002-08/msg00306.php
>
> As best I can tell the objections came from the fact that Thomas had
> implemented it as a postmaster-start-time switch, which made it a
> foot-gun because you could mistakenly start the postmaster with a
> different XLOG than you were using before.  That would not apply to a
> symlink-made-by-initdb approach.  All this is doing is formalizing
> something we already suggest people do by hand...

I guess the downside there is that it won't work on platforms that  
don't support symlinks, whereas the postmaster switch would. Not that  
I condone using such platforms ;^)

-Casey


Re: [PATCHES] xlog directory at initdb time

From
Tom Lane
Date:
Casey Duncan <casey@pandora.com> writes:
> I guess the downside there is that it won't work on platforms that  
> don't support symlinks, whereas the postmaster switch would. Not that  
> I condone using such platforms ;^)

Well, we already bit that bullet with respect to tablespaces, and
haven't gotten much of any pushback.  So I don't see it as a problem
here.
        regards, tom lane


Re: [PATCHES] xlog directory at initdb time

From
Alvaro Herrera
Date:
Tom Lane wrote:
> Casey Duncan <casey@pandora.com> writes:
> > I guess the downside there is that it won't work on platforms that  
> > don't support symlinks, whereas the postmaster switch would. Not that  
> > I condone using such platforms ;^)
> 
> Well, we already bit that bullet with respect to tablespaces, and
> haven't gotten much of any pushback.  So I don't see it as a problem
> here.

Note that if Casey is thinking that Win32 does not support symlinks, he
is wrong (we do support tablespaces there).

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.