RE: Alternative database locations are broken

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: "Mikheev, Vadim" <vmikheev(at)SECTORBASE(dot)COM>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: Alternative database locations are broken
Date: 2000-11-04 13:37:10
Message-ID: Pine.LNX.4.21.0011041414320.775-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mikheev, Vadim writes:

> > I could probably go through and fix this, but I'm not fully
> > aware about the larger plan of table spaces that's apparently
> > sneaking in here (cf. RelFileNode.tblNode).
>
> This would be very appreciated. Table spaces will be in 7.2,
> hopefully. For the moment tblNode is just database OID
> (InvalidOid for shared relations).

I think we have a bit of a problem here. In order to restore the
previously existing alternative location feature we'd somehow have to
stick this information into RelFileNode. Firstly, alternative locations
were referenced as text strings (usually environment variable names),
which doesn't seem appropriate to stick into RelFileNode. We could make a
separate system catalog (as I have suggested several times) to assign oids
to these locations.

But RelFileNode already claims to store the identity of the table space,
being the database oid. This doesn't work because a location can contain
more than one database. So effectively we'd need to redefine RelFileNode
something like 'struct { locationid, dbid, relid }'.

I'm afraid I feel incompetent here. RelFileNode is used in too many
places that I don't understand.

> I think that to handle locations we could symlink catalogs - ln -s
> path_to_database_in_some_location .../base/DatabaseOid

But that's a kludge. We ought to discourage people from messing with the
storage internals.

--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-11-04 16:30:51 Re: status applications
Previous Message Thomas Lockhart 2000-11-04 07:43:19 Re: [INTERFACES] DBD::Pg installation seems to fail with 7.1 libs