Re: [COMMITTERS] pgsql-server/src backend/tcop/postgres.cbacke

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thomas Lockhart <lockhart(at)fourpalms(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql-server/src backend/tcop/postgres.cbacke
Date: 2002-08-13 05:23:02
Message-ID: 200208130523.g7D5N2K29051@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Marc G. Fournier wrote:
> On Tue, 13 Aug 2002, Tom Lane wrote:
>
> > Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > > OK, seeing as no one voted, and only Tom and I objected originally, we
> > > will keep the code as Thomas has applied it, namely that PGXLOG/-X is
> > > recognized by initdb, postmaster, postgres, and pg_ctl.
> >
> > We will? It looks to me like Thomas lost the vote 2-to-1.
> >
> > Unless there are more votes, I'm going to *insist* that this code be
> > changed. It's dangerous and offers no offsetting benefit. XLOG
> > location should be settable at initdb, noplace later.
>
> Okay, I'm going to pop up here and side with Thomas ... I think ... I may
> have missed some issues here, but, quite frankly, I hate symlinks, as I've
> seen it create more evil then good .. hardlinks is a different story ...

OK, that agrees with Thomas's aversion to symlinks.

> And for that reason, I will side with Thomas ...
>
> initdb should allow you to specify a seperate location, which I don't
> think anyone disagrees with ... but, what happens if, for some reason, I
> have to move it to another location? I have to then dump/reload after
> doing a new initdb?

If you move pg_xlog, you have to create a symlink in /data that points
to the new location. Initdb would do that automatically, but if you
move it after initdb, you would have to create the symlink yourself.
With Thomas's current code, you would add/change PGXLOG instead to point
to the new location, rather than modify the symlink.

> One thought at the back of my mind is why not have something like a
> 'PG_VERSION' for XLOG? Maybe something so simple as a text file in both
> the data and xlog directory that just contains a timestamp from the
> initdb? then, when you startup postmaster with a -X option, it compares
> the two files and makes sure that they belong to each other?

Uh, seems it could get messy, but, yea, that would work. It means
adding a file to pg_xlog and /data and somehow matching them. My
feeling was that the symlink was unambiguous and allowed for fewer
mistakes. I think that was Tom's opinion too.

> Bruce, if I'm missing something, could you post a summary/scorecard for
> pros-cons on this issue?

OK, I tried. :-)

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2002-08-13 05:26:01 Re: [COMMITTERS] pgsql-server/src backend/tcop/postgres.cbacke
Previous Message Marc G. Fournier 2002-08-13 05:21:54 Re: [COMMITTERS] pgsql-server/src

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-08-13 05:26:01 Re: [COMMITTERS] pgsql-server/src backend/tcop/postgres.cbacke
Previous Message Marc G. Fournier 2002-08-13 05:21:54 Re: [COMMITTERS] pgsql-server/src