From: | Thomas Swan <tswan(at)idigx(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Tablespaces |
Date: | 2004-03-04 02:31:16 |
Message-ID: | 404694F4.9030006@idigx.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | Postg토토 결과SQL pgsql-hackers-win32 |
Bruce Momjian wrote:
>Greg Stark wrote:
>
>
>>Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
>>
>>
>>
>>>Greg Stark wrote:
>>>
>>>
>>>>>>I am expecting to hear some bleating about this from people whose
>>>>>>preferred platforms don't support symlinks ;-). However, if we don't
>>>>>>
>>>>>>
>>>>Well, one option would be to have the low level filesystem storage (md.c?)
>>>>routines implement a kind of symlink themselves. Just a file with a special
>>>>magic number followed by a path.
>>>>
>>>>
>>On further contemplation it doesn't seem like using symlinks really ought to
>>be necessary. It should be possible to drive everything off the catalog tables
>>while avoidin having the low level filesystem code know anything about them.
>>
>>Instead of having the low level code fetch the pg_* records themselves, some
>>piece of higher level code would do the query and call down to storage layer
>>to inform it of the locations for everything. It would have to do this on
>>database initialization and on any subsequent object creation.
>>
>>Basically maintain an in-memory hash table of oid -> path, and call down to
>>the low level code whenever that hash changes. (Or more likely oid->ts_id and
>>a separate list of ts_id -> path.)
>>
>>
>
>The advantage of symlinks is that an administrator could see how things
>are laid out from the command line.
>
>
>
That's a poor reason to require symlinks. The administrator can just as
easily open up psql and query pg_tablespace to see that same
information. Besides, the postgres doesn't know where to look on the
filesystem for the /path/to/oid without a system catalog lookup. There
doesn't seem to be any sensible reason to force a filesystem requirement
when the core operations are diffferent to begin with.
If a more global view of all databases is necessary, perhaps there ought
to be a system wide view which could display all of that information at
once: dbname, relation name, and physical location.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-03-04 02:41:17 | Re: Tablespaces |
Previous Message | Alex J. Avriette | 2004-03-04 00:19:50 | Re: Slony-I makes progress |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-03-04 02:41:17 | Re: Tablespaces |
Previous Message | Bruce Momjian | 2004-03-03 17:52:40 | Re: Tablespaces |