Re: Tablespaces

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Tablespaces
Date: 2004-03-03 04:26:21
Message-ID: 200403030426.i234QMi26168@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32

Tom Lane wrote:
> Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> writes:
> > A table space is a directory structure. The directory structure is as
> > follows:
> > [swm(at)dev /path/to/tblspc]$ ls
> > OID1/ OID2/
> > OID1 and OID2 are the OIDs of databases which have created a table space
> > against this file system location. In this respect, a table space
> > resembles $PGDATA/base. I thought it useful to keep this kind of
> > namespace mechanism in place ...
>
> Actually, this is *necessary* AFAICT. The case that forces it is DROP
> DATABASE. Since you have to execute that from another database, there's
> no reasonable way to look into the target database's catalogs. That
> means that the OID of the database has to be sufficient information to
> get rid of all its files. You can do this fairly easily if in each
> tablespace (whose locations you know from the shared pg_tablespace
> table) you can look for a subdirectory matching the target database's
> OID. If we tried to put the database's files just "loose" in each
> tablespace directory then we'd be in trouble.
>

Gavin, let us know if you want us to create the global pg_tablespace for
you. Some of us have done a lot of system catalog work.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-03-03 04:27:46 Re: Tablespaces
Previous Message Bruce Momjian 2004-03-03 04:25:04 Re: Tablespaces

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Bruce Momjian 2004-03-03 04:27:46 Re: Tablespaces
Previous Message Bruce Momjian 2004-03-03 04:25:04 Re: Tablespaces