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

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

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

There is no "the symlink", but of course that tinkering is in no way
precluded by the new code. Although some seem to like symlinks, others
(including myself) see no good engineering practice in making them the
only foundation for distributing files across file systems.

The patches as-is follow existing PostgreSQL practice, have complete and
perfect backward compatibility, and do not preclude changes in
underlying implementation in the future if those who are objecting
choose to do a complete and thorough job of meeting my objections to the
current counter-suggestions. As an example, two lines of code in initdb
would add "the beloved symlink" to $PGDATA, eliminating one objection
though (of course) one I don't support.

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

In the spirit of gratutious overstatement, I'll point out again:
symlinks are evil. Any sense of a job well done is misplaced if our
underpinnings rely on them for distributing files across file systems.
As an ad hoc hack to work around current limitations they may have some
utility.

Anyway, istm that this is way too much discussion for a small extension
of capability, and it has likely cost a table and index "with location"
implementation for the upcoming release just due to time wasted
discussing it. Hope it was worth it :/

- Thomas

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2002-08-13 13:00:15 Re: [COMMITTERS] pgsql-server/src backend/tcop/postgres.cbacke
Previous Message Greg Copeland 2002-08-13 05:30:35 Re: [COMMITTERS] pgsql-server/src

Browse pgsql-hackers by date

  From Date Subject
Next Message Curt Sampson 2002-08-13 06:14:46 Re: OOP real life example (was Re: Why is MySQL more
Previous Message Greg Copeland 2002-08-13 06:05:14 Re: OOP real life example (was Re: Why is MySQL more