Re: [GENERAL] PGXLOG variable worthwhile?

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Greg Copeland <greg(at)CopelandConsulting(dot)Net>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>, PostgresSQL Hackers Mailing List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] PGXLOG variable worthwhile?
Date: 2002-09-24 17:33:18
Message-ID: Pine.LNX.4.33.0209241130031.1889-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On 19 Sep 2002, Greg Copeland wrote:

> I think Marc made a pretty good case about the use of command line
> arguments but I think I have to vote with Tom. Many of the command line
> arguments you seem to be using do sorta make sense to have for easy
> reference or to help validate your runtime environment for each
> instance. The other side of that is, I completely agree with Tom in the
> it's a very dangerous option. It would be begging for people to shoot
> themselves with it. Besides, just as you can easily parse the command
> line, you can also parse the config file to out that information. Plus,
> it really should be a very seldom used option. When it is used, it's
> doubtful that you'll need the same level of dynamic control that you get
> by using command line options.
>
> As a rule of thumb, if an option is rarely used or is very dangerous if
> improperly used, I do think it should be in a configuration file to
> discourage adhoc use.
>
> Let's face it, specify XLOG location is hardly something people need to
> be doing on the fly.
>
> My vote is config file it and no command line option!

I'd go one step further, and say that it should not be something a user
should do by hand, but there should be a script to do it, and it would
work this way:

If there is a DIRECTORY called pg_xlog in $PGDATA, then use that. If
there is a FILE called pg_xlog in $PGDATA, then that file will have the
location of the directory stored in it. That file will be created when
the move_pgxlog script is run, and that script will be have all the logic
inside it to determine how to move the pg_xlog directory safely, i.e.
making sure there's room on the destination, setting permissions, etc...

that way, if you're dumb as a rock or smart as a rocket scientist, you do
it the same way, and the script makes sure you don't scram your database
in a not too bright moment. No postgresql.conf var, no command line
switch, a file or directory, and a script.

Seem workable? Or am I on crack?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-09-24 18:09:01 Re: rotatelog / logrotate with PostgreSQL
Previous Message Oliver Elphick 2002-09-24 17:28:39 Re: rotatelog / logrotate with PostgreSQL

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-09-24 17:40:39 Re: Web site
Previous Message scott.marlowe 2002-09-24 17:23:04 Re: Beta2 on Friday Morning (Was: Re: Open 7.3 items)