Skip site navigation (1) Skip section navigation (2)

Re: WAL file location

From: Thomas Lockhart <lockhart(at)fourpalms(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WAL file location
Date: 2002-07-30 06:09:28
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
> > I've developed patches to be able to specify the location of the WAL
> > directory, with the default location being where it is now. The patches
> > define a new environment variable PGXLOG (a la PGDATA) and postmaster,
> > postgres, initdb and pg_ctl have been taught to recognize a new command
> > line switch "-X" a la "-D".
> Uh ... if I randomly modify PGXLOG and restart the postmaster, what
> happens?  Unless you've added code to *move* pg_xlog, this doesn't seem
> like a good idea.

Perhaps you don't remember the current (and future) behavior of
PostgreSQL. If it does not find the WAL files it declines to start up.
The behavior is very similar to that for the data area. If it does not
exist, the postmaster declines to start.

As noted above, the default behavior remains the same as now. So what is
the objection precisely?

> More generally, I do not like depending on postmaster environment
> variables --- our experience with environment variables for database
> locations has been uniformly bad, and so ISTM that extending that
> mechanism into pg_xlog is exactly the wrong direction to head.

Unsupported allegation. My experience with environment variables for
database locations has been uniformly good (also an unsupported
allegation, but what the heck). And you will note that, as with PGDATA,
the environment variable is not required. So you can easily stay away
from that which you do not like, for whatever reason.

From my experience with other DBMSes, storage management was always a
weak point. You have suggested in the past that hardcoding paths into
the database itself is the Right Way, but in my large Ingres production
systems that was precisely the weak point in their support; you were
hamstrung when planning and expanding storage by choices you made way
back when the the system was first installed.

Linking external definitions to internal logical areas enhances
flexibility, it is not required and does not compromise the system.
Refusing to allow them at all just limits options with no offsetting

> The current mechanism for moving pg_xlog around is to create a symlink
> from $PGDATA/pg_xlog to someplace else.  I'd be all in favor of creating
> some code to help automate moving pg_xlog that way, but I don't think
> introducing an environment variable will improve matters.

Your opinion is noted.

> > I'm intending to head towards finer control of locations of tables and
> > indices next by implementing some notion of named storage area, perhaps
> > including the "tablespace" nomenclature though it would not be the same
> > thing as in Oracle since it would not be fixed size but more akin to the
> > "secondary locations" that we support now for entire databases.
> The existing secondary-location mechanism is horrible.  Please do not
> emulate it...

I've not quite understood why you have a strong opinion on something you
don't care about and don't care to contribute to.

                    - Thomas

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2002-07-30 06:20:46
Subject: Re: Weird manual page
Previous:From: Christopher Kings-LynneDate: 2002-07-30 06:06:27
Subject: Weird manual page

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group