Mapping tables to disk drives

Started by Richard Embersonabout 24 years ago4 messagesgeneral
Jump to latest
#1Richard Emberson
emberson@phc.net

Are there any guides, references, etc. for helping someone:
1) know how to map a particular table to a particular disk drive (is it
just symbolic links) and
2) for what type of queries and table layout combination would it make
sense to do so?

Thanks

Richard

#2Bruce Momjian
bruce@momjian.us
In reply to: Richard Emberson (#1)
Re: Mapping tables to disk drives

Richard Emberson wrote:

Are there any guides, references, etc. for helping someone:
1) know how to map a particular table to a particular disk drive (is it
just symbolic links) and

Yep, just symlinks. We know we need a better method. Also, as the
table grows, extent files for >1gb will also need to be symlinked.

2) for what type of queries and table layout combination would it make
sense to do so?

First, pg_xlog/ should be on a separate drive. Then you can think about
moving indexes and tables to separate drives.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#3Bruce Momjian
bruce@momjian.us
In reply to: Bruce Momjian (#2)
Re: Mapping tables to disk drives

Richard Emberson wrote:

Bruce Momjian wrote:

Richard Emberson wrote:

Are there any guides, references, etc. for helping someone:
1) know how to map a particular table to a particular disk drive (is it
just symbolic links) and

Yep, just symlinks. We know we need a better method. Also, as the
table grows, extent files for >1gb will also need to be symlinked.

2) for what type of queries and table layout combination would it make
sense to do so?

First, pg_xlog/ should be on a separate drive. Then you can think about
moving indexes and tables to separate drives.

I looked around the .../data directory. How does one map from index and
table names
to file names?

/contrib/oid2name.

Also, I assume that when a extent file for >1Gb is created (by the DB as it
is running)
one must stop the DB, move the file, make a symbolic link to the moved file,
and then
restart the DB.

Yes, yuck.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#4Richard Emberson
emberson@phc.net
In reply to: Bruce Momjian (#2)
Re: Mapping tables to disk drives

Bruce Momjian wrote:

Richard Emberson wrote:

Are there any guides, references, etc. for helping someone:
1) know how to map a particular table to a particular disk drive (is it
just symbolic links) and

Yep, just symlinks. We know we need a better method. Also, as the
table grows, extent files for >1gb will also need to be symlinked.

2) for what type of queries and table layout combination would it make
sense to do so?

First, pg_xlog/ should be on a separate drive. Then you can think about
moving indexes and tables to separate drives.

I looked around the .../data directory. How does one map from index and
table names
to file names?

Also, I assume that when a extent file for >1Gb is created (by the DB as it
is running)
one must stop the DB, move the file, make a symbolic link to the moved file,
and then
restart the DB.

Show quoted text
--
Bruce Momjian                        |  http://candle.pha.pa.us
pgman@candle.pha.pa.us               |  (610) 853-3000
+  If your life is a hard drive,     |  830 Blythe Avenue
+  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026