Thread: Does PostgreSQL Stores its database in multiple disks?

Does PostgreSQL Stores its database in multiple disks?

From
"Igor Maciel Macaubas"
Date:
Hi Guys,
 
I have a PostgreSQL server, running 7.4.2, that will store a really large amount of data (200GB) being migrated from an Oracle database. I have a machine with two 120GB Ultra ATA IDE disks, and I'd like to know if PostgreSQL could split it over both disks (that gives me 240GB or storage). Does he do this automatically ?
Or I'll have to split it manually, creating symbolic links on my file system (ext3)?
Does anyone ever stored a database (see, it's ONE database only, not a cluster) on multiple disks ?
 
What about PgSQL 8? It'll include this feature?
 
Thanks!
 
Regards,
Igor
--
 

Re: Does PostgreSQL Stores its database in multiple disks?

From
Heather Johnson
Date:
Could you configure the two volumes as one volume with RAID? If so, then
Postgres shouldn't require any special adjusting to accomplish what you
are after.

Heather Johnson
Senior Database Programmer
New York Post

Igor Maciel Macaubas wrote:
> Hi Guys,
>
> I have a PostgreSQL server, running 7.4.2, that will store a really
> large amount of data (200GB) being migrated from an Oracle database. I
> have a machine with two 120GB Ultra ATA IDE disks, and I'd like to know
> if PostgreSQL could split it over both disks (that gives me 240GB or
> storage). Does he do this automatically ?
> Or I'll have to split it manually, creating symbolic links on my file
> system (ext3)?
> Does anyone ever stored a database (see, it's ONE database only, not a
> cluster) on multiple disks ?
>
> What about PgSQL 8? It'll include this feature?
>
> Thanks!
>
> Regards,
> Igor
> --
> igor@providerst.com.br <mailto:igor@providerst.com.br>
>

Re: Does PostgreSQL Stores its database in multiple disks?

From
"Igor Maciel Macaubas"
Date:
Hi,

Heather, I might be able to do it. Let me check .. I can buy a cheap RAID
IDE controller and try to mount everything as one.

I was looking at the change log of postgresql 8, and figured out that it
supports tablespace now, giving me the flexibility of storing my tables in
different disks and even different directories if I want.

So, I'm thinking in, instead of migrating it from oracle to 7.4.2, migrate
it directly to 8.0 and be a beta tester for 8.0. that would be a great
experiment, don't you think?
Is anyone here using pgsql 8.0 in production now? I'm already using it in my
development environment, around 80 tables but just a few megabytes of data
(it's development). Is anyone here using it in a real world application by
now?

Regards,
Igor
--
igor@providerst.com.br


----- Original Message -----
From: "Heather Johnson" <hjohnson@nypost.com>
To: "Igor Maciel Macaubas" <igor@providerst.com.br>
Cc: <pgsql-admin@postgresql.org>
Sent: Friday, October 01, 2004 6:17 PM
Subject: Re: [ADMIN] Does PostgreSQL Stores its database in multiple disks?


> Could you configure the two volumes as one volume with RAID? If so, then
> Postgres shouldn't require any special adjusting to accomplish what you
> are after.
>
> Heather Johnson
> Senior Database Programmer
> New York Post
>
> Igor Maciel Macaubas wrote:
>> Hi Guys,
>>  I have a PostgreSQL server, running 7.4.2, that will store a really
>> large amount of data (200GB) being migrated from an Oracle database. I
>> have a machine with two 120GB Ultra ATA IDE disks, and I'd like to know
>> if PostgreSQL could split it over both disks (that gives me 240GB or
>> storage). Does he do this automatically ?
>> Or I'll have to split it manually, creating symbolic links on my file
>> system (ext3)?
>> Does anyone ever stored a database (see, it's ONE database only, not a
>> cluster) on multiple disks ?
>>  What about PgSQL 8? It'll include this feature?
>>  Thanks!
>>  Regards,
>> Igor
>> --
>> igor@providerst.com.br <mailto:igor@providerst.com.br>
>>


Re: Does PostgreSQL Stores its database in multiple disks?

From
Christopher Browne
Date:
Centuries ago, Nostradamus foresaw when igor@providerst.com.br ("Igor Maciel Macaubas") would write:
> Heather, I might be able to do it. Let me check .. I can buy a cheap
> RAID IDE controller and try to mount everything as one.

You'd be about as well off, if you're running Linux, to use the "md"
RAID driver that simulates RAID in software.

> I was looking at the change log of postgresql 8, and figured out that
> it supports tablespace now, giving me the flexibility of storing my
> tables in different disks and even different directories if I want.
>
> So, I'm thinking in, instead of migrating it from oracle to 7.4.2,
> migrate it directly to 8.0 and be a beta tester for 8.0. that would be
> a great experiment, don't you think?
> Is anyone here using pgsql 8.0 in production now? I'm already using it
> in my development environment, around 80 tables but just a few
> megabytes of data (it's development). Is anyone here using it in a
> real world application by now?

Nobody should be considering using 8.0 for anything called "production
use" at this point in time, because it is NOT guaranteed that there
will be an upgrade path to the "official" release.

Now, I'm possibly 'somewhat conservative,' as someone that wouldn't
want to call a system 'production' if it's using cheapo IDE drives.

But what you're proposing isn't merely a matter of 'trying to jump the
learning curve;' you're tempting, instead, the "learning cliff," and
the results of problems, there, are that instead of scuffing your
knees, you wind up falling 8 stories and going "splat."
--
output = ("cbbrowne" "@" "ntlug.org")
http://www.ntlug.org/~cbbrowne/spiritual.html
Rules of the  Evil Overlord #33. "I won't  require high-ranking female
members of  my organization to wear a  stainless-steel bustier. Morale
is  better with  a more  casual dress-code.   Similarly,  outfits made
entirely from black leather will be reserved for formal occasions."
<http://www.eviloverlord.com/>

Re: Does PostgreSQL Stores its database in multiple disks?

From
Christian Fowler
Date:

Igor,

I would recommend you investigate LVM:

http://www.tldp.org/HOWTO/LVM-HOWTO/

This enables you to string multiple physical units into a single volume -
as well as expand and grow the volume. I am unsure about postgres
consequences of this for as much data as you have, so I will leave it up
to others to comment about this.

However, my recommendation is for a modest investment of a third 120GB
drive and a RAID card, you could do RAID 5 with 3 disks and get 240GB of
storage.


On Fri, 1 Oct 2004, Igor Maciel Macaubas wrote:

> Hi Guys,
>
> I have a PostgreSQL server, running 7.4.2, that will store a really
> large amount of data (200GB) being migrated from an Oracle database. I
> have a machine with two 120GB Ultra ATA IDE disks, and I'd like to know
> if PostgreSQL could split it over both disks (that gives me 240GB or
> storage). Does he do this automatically ? Or I'll have to split it
> manually, creating symbolic links on my file system (ext3)? Does anyone
> ever stored a database (see, it's ONE database only, not a cluster) on
> multiple disks ?
>
> What about PgSQL 8? It'll include this feature?
>
> Thanks!
>
> Regards,
> Igor
> --
> igor@providerst.com.br
>

[ \ /
[ >X<   spider@steelsun.com   |   http://www.viovio.com/
[ / \

Re: Does PostgreSQL Stores its database in multiple disks?

From
Stephen Frost
Date:
* Igor Maciel Macaubas (igor@providerst.com.br) wrote:
> I have a PostgreSQL server, running 7.4.2, that will store a really large amount of data (200GB) being migrated from
anOracle database. I have a machine with two 120GB Ultra ATA IDE disks, and I'd like to know if PostgreSQL could split
itover both disks (that gives me 240GB or storage). Does he do this automatically ? 
> Or I'll have to split it manually, creating symbolic links on my file system (ext3)?
> Does anyone ever stored a database (see, it's ONE database only, not a cluster) on multiple disks ?
>
> What about PgSQL 8? It'll include this feature?

An alternative might be to use some kind of LVM (such as device
mapper/LVM2 under Linux) to combine the two disks into one logical
device.

    Stephen

Attachment

Re: Does PostgreSQL Stores its database in multiple disks?

From
"Scott Marlowe"
Date:
On Fri, 2004-10-01 at 15:01, Igor Maciel Macaubas wrote:
> Hi Guys,
>
> I have a PostgreSQL server, running 7.4.2, that will store a really
> large amount of data (200GB) being migrated from an Oracle database. I
> have a machine with two 120GB Ultra ATA IDE disks,

I'd normally advise against ATA drives in a production system.  If you
must use them, make sure the write cache is turned off or you risk data
corruption should the machine lose power.

>  and I'd like to know if PostgreSQL could split it over both disks
> (that gives me 240GB or storage). Does he do this automatically ?

Not automatically, no.  With 8.0's table space feature, you could put
half your database tables etc... on one drive and one half on another.
This would require you to keep track of how much your putting in one or
other, and could get rather tedious.

If you don't mind shutting down the database and copying / linking the
individual table files you could do that, but again, that's gonna
require you to do a lot of housekeeping on your own.

Lastly, you could use some kind of RAID or LVM setup to accomplish this.

For testing purposes running this on a RAID-0 with linux's MD or LVM
modules should work fine.  But RAID-0 has no redundancy and a single
drive failure means the whole set goes down.

With 4 drives you could set up a RAID 1+0 array (or 0+1) and place your
data there.  That setup could survive a single drive failure and keep on
going.

If your database will be writing a lot, it would be well worth your
while to investigate a SCSI RAID controller with battery backed cache
set to write back.

> Or I'll have to split it manually, creating symbolic links on my file
> system (ext3)?

That would be a lot of work.

> Does anyone ever stored a database (see, it's ONE database only, not a
> cluster) on multiple disks ?

Standard answer is use RAID arrays.

> What about PgSQL 8? It'll include this feature?

Not really.  While it will support table spaces, the job of combining
multiple drives into one large logical drive is the domain of your
operating system / underlying hardware.

I recommend the LSI MegaRAID series controllers, and a few other folks
on the list have had good luck with the Escalade IDE RAID controllers,
which aren't the toys most IDE RAID controllers are, they support
multiple RAID levels as well as battery backed cache.



Re: Does PostgreSQL Stores its database in multiple disks?

From
Björn Lundin
Date:
Igor Maciel Macaubas wrote:

> Hi Guys,
>
> I have a PostgreSQL server, running 7.4.2, that will store a really large
> amount of data (200GB) being migrated from an Oracle database. I have a
> machine with two 120GB Ultra ATA IDE disks, and I'd like to know if
> PostgreSQL could split it over both disks (that gives me 240GB or
> storage).

Have you considered Raid? Raid 0 or 1 (I keep forgetting which)
will make the 2 disks to appear as one (The other will mirror one disk)

--
/Björn
-------------------------------------------------------------------
http://lundin.homelinux.net
Registered Linux User No. 267342 <http://counter.li.org>