Re: Tablespaces
От | Bruce Momjian |
---|---|
Тема | Re: Tablespaces |
Дата | |
Msg-id | 200403030426.i234QMi26168@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: Tablespaces (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Tom Lane wrote: > Gavin Sherry <swm@linuxworld.com.au> writes: > > A table space is a directory structure. The directory structure is as > > follows: > > [swm@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@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073
В списке pgsql-hackers по дате отправления: