Обсуждение: Temporary files directory

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

Temporary files directory

От
Robert.Farrugia@go.com.mt
Дата:
Is it possible to tell postgres where to create the temporary files
(especially during clustering and re-indexing) ?  Since I have very large
tables, there is not enough space on the same partition to do clsutering.

Additionally, is it possible to create a database than spans on more than
one partition or harddisk under Linux ?

Thanks
Robert


Re: Temporary files directory

От
Tom Lane
Дата:
Robert.Farrugia@go.com.mt writes:
> Is it possible to tell postgres where to create the temporary files
> (especially during clustering and re-indexing) ?

Not at present.

> Additionally, is it possible to create a database than spans on more than
> one partition or harddisk under Linux ?

Right now, the only way to do this is to manually move individual files
around and then establish symlinks to them from where they were in the
database directory.  While this works, it's pretty darn tedious to
maintain, especially for large tables that might contain many segments;
and you more or less have to shut down the database while moving files
around, too.  We have plans to create a more useful "tablespace"
administration capability in the future.

What I'd recommend in the short term is that you use a filesystem
implementation that allows a logical filesystem to span multiple
physical disks.  My preferred OS, HPUX, can do this easily; I believe
the same thing can be done with some Linux filesystems but don't know
the details.  (Any help out there?)

            regards, tom lane

Re: Temporary files directory

От
Ragnar Kjørstad
Дата:
On Tue, Jan 23, 2001 at 11:38:55AM -0500, Tom Lane wrote:
> > Additionally, is it possible to create a database than spans on more than
> > one partition or harddisk under Linux ?
>
> Right now, the only way to do this is to manually move individual files
> around and then establish symlinks to them from where they were in the
> database directory.  While this works, it's pretty darn tedious to
> maintain, especially for large tables that might contain many segments;
> and you more or less have to shut down the database while moving files
> around, too.  We have plans to create a more useful "tablespace"
> administration capability in the future.
>
> What I'd recommend in the short term is that you use a filesystem
> implementation that allows a logical filesystem to span multiple
> physical disks.  My preferred OS, HPUX, can do this easily; I believe
> the same thing can be done with some Linux filesystems but don't know
> the details.  (Any help out there?)

It's not really a filesystem issue, but a volume-manager issue.
On linux you can use LVM or md to create devices that span multiple
disks. With LVM you can even add more disks and grow your devices
without stoping your databases! :-)




--
Ragnar Kjørstad
Big Storage

Re: Temporary files directory

От
"Oliver Elphick"
Дата:
Tom Lane wrote:
  >What I'd recommend in the short term is that you use a filesystem
  >implementation that allows a logical filesystem to span multiple
  >physical disks.  My preferred OS, HPUX, can do this easily; I believe
  >the same thing can be done with some Linux filesystems but don't know
  >the details.  (Any help out there?)

Linux kernel 2.4 supports Logical Volumes. As in HP/UX, this enables a
logical partition to be assembled from multiple partitions on multiple
disks.

I haven't tried it yet, though.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Look not every man on his own interests, but every man
      also on the things of others. Let this mind be in you,
      which was also in Christ Jesus"
                                Philippians 2:4,5