Thread: xlog directory at initdb time

xlog directory at initdb time

From
Euler Taveira de Oliveira
Date:
Hi,
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.

--
  Euler Taveira de Oliveira
  http://www.timbira.com/

Attachment

Re: xlog directory at initdb time

From
"Simon Riggs"
Date:
On Tue, 2006-12-26 at 23:56 -0200, Euler Taveira de Oliveira wrote:

> 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.

Looks good.

I'm no expert on coding style, so I won't comment on anything there.

Any test harness changes? Or a test script?

--
  Simon Riggs
  EnterpriseDB   http://www.enterprisedb.com



Re: xlog directory at initdb time

From
Euler Taveira de Oliveira
Date:
Simon Riggs wrote:

> > 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.
>
> Looks good.
>
> I'm no expert on coding style, so I won't comment on anything there.
>
> Any test harness changes? Or a test script?
>
Unfortunately, nope. :( I tested it manually.
How did i test it?

1) xlog directory doesn't exist -- OK
2) xlog directory exists -- OK
3) xlog directory exists but doesn't have the right permissions --
FAILED
4) xlog diretory exists but is not empty -- FAILED
5) interrupting initdb execution (Ctrl-C) to test the cleanup code -- OK

PS> i didn't test it in a win32 box but it should be ok.

--
  Euler Taveira de Oliveira
  http://www.timbira.com/


Re: xlog directory at initdb time

From
Bruce Momjian
Date:
Your patch has been added to the PostgreSQL unapplied patches list at:

    http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

------------------------------------------------------------------------
Euler Taveira de Oliveira wrote:
> Hi,
> 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.
>
> --
>   Euler Taveira de Oliveira
>   http://www.timbira.com/

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match

--
  Bruce Momjian   bruce@momjian.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Re: 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.

On the name of the option, it's not actually a "data" directory, so I'd just
call it --xlogdir, parallel to --datadir.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

Re: xlog directory at initdb time

From
Euler Taveira de Oliveira
Date:
Peter Eisentraut wrote:

> On the name of the option, it's not actually a "data" directory, so I'd just
> call it --xlogdir, parallel to --datadir.
>
Seems reasonable. Patch modified is attached.


--
  Euler Taveira de Oliveira
  http://www.timbira.com/

Attachment

Re: xlog directory at initdb time

From
Bruce Momjian
Date:
Patch applied.  Thanks.

---------------------------------------------------------------------------


Euler Taveira de Oliveira wrote:
> Peter Eisentraut wrote:
>
> > On the name of the option, it's not actually a "data" directory, so I'd just
> > call it --xlogdir, parallel to --datadir.
> >
> Seems reasonable. Patch modified is attached.
>
>
> --
>   Euler Taveira de Oliveira
>   http://www.timbira.com/

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
>                http://archives.postgresql.org

--
  Bruce Momjian   bruce@momjian.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +