From: | "Ross J(dot) Reedstrom" <reedstrm(at)wallace(dot)ece(dot)rice(dot)edu> |
---|---|
To: | PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Happy column dropping |
Date: | 2000-01-25 16:37:11 |
Message-ID: | 20000125103711.B423@rice.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jan 25, 2000 at 09:14:29AM -0500, Bruce Momjian wrote:
> > On Mon, 24 Jan 2000, Bruce Momjian wrote:
> >
> > > New file name will not be just oid. Too hard to administer.
> >
>
> Ingres has table names as numbered files. It is a pain to figure out
> which files match which tables. If you need to restore a table from
> tape, the pg_class entry is gone and you have no way to figure out the
> right table. When analyzing disk space, figuring who is using the space
> is a pain.
>
Hmm, how about a map file, of conventional name, kept in the pgsql/data
dir, that contains filename -> db/tablename mappings? It would be
essentially a pretty printed dump of pg_class. That way, the admin
has access to the mapping even when the postmaster is down. Even to
restore from tape: grab pg_class_map from the tape (you did dump it
to the beginning, right?) and then grab the file you need. I don't see
this as being a particularly large file, in any case, and DDL isn't a
speed critical path, so rewriting the pg_class_map file wouldn't hurt.
And, since it's just for human/admin consumption, so major problem if
it gets out of sync: just regenerate it from pg_class. Could even be
used to sanity check the DBMS on start up: generate a new pg_class_map,
compare it to the old: if they don't match, fire a warning/die?
I'd suggest a format that's easily machine by awk/sed/grep (perl, etc.)
for those db admin tasks Bruce is talking about (space, etc.) Heck,
it'd be easy to whip up a 'generate a bunch of symlinks' script
to get the tablenames back, if you really need them.
Ross
--
Ross J. Reedstrom, Ph.D., <reedstrm(at)rice(dot)edu> Tel. 713-348-6166
NSBRI Research Scientist/Programmer Fax 713-348-6182
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-01-25 17:16:46 | Re: [SQL] DISTINCT ON: speak now or forever hold your peace |
Previous Message | Bruce Momjian | 2000-01-25 16:36:09 | Re: [HACKERS] Happy column dropping |