Tablespaces

Started by John Gardneralmost 19 years ago5 messagesgeneral
Jump to latest
#1John Gardner
john.gardner@tagish.co.uk

I've been testing one of our apps on PostgreSQL for the last few months
and I'm about ready to put it on the production server, but I need
advice on where to locate the tablespace. I've been so concerned
getting the app working, I haven't even considered this yet.

I'm using a RPM install of Postgres, so the data directory is located at
/var/lib/pgsql/data/. Shall I just create a directory under here and
point the tablespace to there? Any advice would be appreciated.

Thanks in advance

John

#2Richard Huxton
dev@archonet.com
In reply to: John Gardner (#1)
Re: Tablespaces

John Gardner wrote:

I've been testing one of our apps on PostgreSQL for the last few months
and I'm about ready to put it on the production server, but I need
advice on where to locate the tablespace. I've been so concerned
getting the app working, I haven't even considered this yet.

I'm using a RPM install of Postgres, so the data directory is located at
/var/lib/pgsql/data/. Shall I just create a directory under here and
point the tablespace to there? Any advice would be appreciated.

If you're not going to be spreading your installation over multiple
disks (well, mount-points), there's no need to play with tablespaces at all.

--
Richard Huxton
Archonet Ltd

#3Albe Laurenz
all@adv.magwien.gv.at
In reply to: John Gardner (#1)
Re: Tablespaces

I've been testing one of our apps on PostgreSQL for the last few

months

and I'm about ready to put it on the production server, but I need
advice on where to locate the tablespace. I've been so concerned
getting the app working, I haven't even considered this yet.

I'm using a RPM install of Postgres, so the data directory is located

at

/var/lib/pgsql/data/. Shall I just create a directory under here and
point the tablespace to there? Any advice would be appreciated.

You can create it wherever you want as long as the database server has
permissions to access it.
You'll have to specify the full path in the CREATE TABLESPACE statement.

Are you sure that you need a tablespace at all?

Yours,
Laurenz Albe

#4Ray Stell
stellr@cns.vt.edu
In reply to: John Gardner (#1)
Re: Tablespaces

On Mon, Jun 04, 2007 at 09:49:03AM +0100, John Gardner wrote:

/var/lib/pgsql/data/. Shall I just create a directory under here and
point the tablespace to there? Any advice would be appreciated.

One of the points of ts is to balance io over different controllers/disks.
Someone should evalulate the current load and overlay the estimated
load of the new app and see if the current data path will support it.
Include growth estimates for all the apps. If the load is a concern,
create the ts on a seperate io path. What are the possible results of
not doing this analysis?

#5Robert Treat
xzilla@users.sourceforge.net
In reply to: Richard Huxton (#2)
Re: Tablespaces

On Monday 04 June 2007 04:53, Richard Huxton wrote:

John Gardner wrote:

I've been testing one of our apps on PostgreSQL for the last few months
and I'm about ready to put it on the production server, but I need
advice on where to locate the tablespace. I've been so concerned
getting the app working, I haven't even considered this yet.

I'm using a RPM install of Postgres, so the data directory is located at
/var/lib/pgsql/data/. Shall I just create a directory under here and
point the tablespace to there? Any advice would be appreciated.

If you're not going to be spreading your installation over multiple
disks (well, mount-points), there's no need to play with tablespaces at
all.

Well, one could use them as part of a disk quota utilization scheme... granted
doesn't sound like the OP needs them... just saying is all.

--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL