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

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [COMMITTERS] pgsql-server/src backend/tcop/postgres.cbacke
Дата
Msg-id 200208130523.g7D5N2K29051@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql-server/src backend/tcop/postgres.cbacke  ("Marc G. Fournier" <scrappy@hub.org>)
Ответы Re: [COMMITTERS] pgsql-server/src backend/tcop/postgres.cbacke
Список pgsql-hackers
Marc G. Fournier wrote:
> On Tue, 13 Aug 2002, Tom Lane wrote:
> 
> > Bruce Momjian <pgman@candle.pha.pa.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@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: [COMMITTERS] pgsql-server/src
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [COMMITTERS] pgsql-server/src backend/tcop/postgres.cbacke