Обсуждение: Tablespaces

Поиск
Список
Период
Сортировка

Tablespaces

От
John Gardner
Дата:
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

Re: Tablespaces

От
Richard Huxton
Дата:
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

Re: Tablespaces

От
"Albe Laurenz"
Дата:
> 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

Re: Tablespaces

От
Ray Stell
Дата:
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?

Re: Tablespaces

От
Robert Treat
Дата:
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