PostgreSQL is HUGE on my harddrive

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

PostgreSQL is HUGE on my harddrive

Postby damien28173 » Thu May 13, 2010 3:37 am

Hey, I read through 4 pages on the forum with nothing like this in the title.

I bought PT3 about a month ago. I have version 3.06.2
I bought 1 million hands a little while ago and imported them. (took forever) and then another million last night. clustering took nearly 7 hrs and ended up not getting finished. I tried to finish it tonight and again its taking forever, after clicking on the harddrive I noticed I only had 1.4 GB lefts on 75GB harddrive partition. after looking around I found the PostgreSQL folder and a properties search unveiled a whopping 25GB used space. Now I only successfully got 1 million hands plus maybe 300k more freebies but they folder is getting huge and bigger by the second (of clustering)

Is there a way to shrink this file, move it without losing all my info or am I just supposed to accept the fact that this file is now 15% of my total disk space and growing?

Is there any quick fixes or do I have to uninstall my PT3 files and PostgreSQL files and create a new partition?
I guess my main question is should this file really be 25 GB large with only 2 million 2.5 million hands tops in it?
damien28173
 
Posts: 11
Joined: Mon Apr 26, 2010 6:45 pm

Re: PostgreSQL is HUGE on my harddrive

Postby kraada » Thu May 13, 2010 9:32 am

Yes, PT3 databases take up a lot of space because they store a lot of data. Your database sounds about the right size for what you've imported, the rule of thumb that I use is 1M FR hands = 10G. It's not perfect but it's close.

The good news though is that large hard drives are fairly cheap - this 2TB HD is going for $100 and should work well. And a 2TB HD could hold a 200M hand database. (I'm sure you could find other drives that work equally well also, this is just an example.)
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: PostgreSQL is HUGE on my harddrive

Postby damien28173 » Fri May 14, 2010 8:42 am

Can you move your database without losing any information? do you need to repath anything?
damien28173
 
Posts: 11
Joined: Mon Apr 26, 2010 6:45 pm

Re: PostgreSQL is HUGE on my harddrive

Postby kraada » Fri May 14, 2010 9:06 am

The easiest way to move your database is probably to back it up (see our new Tutorial: Backup & Restore), then uninstall PostgreSQL, PT3, delete the PostgreSQL directory and PT3 configurations directory and reinstall PostgreSQL on your spare drive, then restore the database and everything else from the backup.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: PostgreSQL is HUGE on my harddrive

Postby mickle » Sat Jun 05, 2010 9:50 am

I've also got a large footprint on my hard drive. I have 196000 hands of cash and 175000 hands of tournament yet my postgreSQL folder is 4.25 GB in size. I'll do another maintenance run later today, but in the meantime I have noticed that there are lots of large files in C:\Program Files\PostgreSQL\8.3\data\base\1643. The names are 20861, 21197 etc. 8 of the files range from 220mb to 550mb. Is this what I should expect to be seeing?
mickle
 
Posts: 50
Joined: Tue Jun 10, 2008 5:36 pm

Re: PostgreSQL is HUGE on my harddrive

Postby kraada » Sat Jun 05, 2010 11:56 am

Yes, that is normal; those files comprise your actual database, if you move or delete those files you will break your database.

The only files safe to remove are in the pg_log directory (not pg_clog or pg_xlog just pg_log).
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: PostgreSQL is HUGE on my harddrive

Postby puyanwei » Thu Jun 17, 2010 9:49 am

Hi Kraada,

My database is also huge. 15GB but only 500k hands. I play PokerStars SNGs, not cash, and there's a few hands on Full Tilt where I don't play on anymore. I'm using a boot camped Macbook laptop (30BG HD), and I have an external hard drive but I don't want to put my database on there because it will slow down the data retrieval process of my HUD.
puyanwei
 
Posts: 37
Joined: Wed Oct 21, 2009 8:25 am

Re: PostgreSQL is HUGE on my harddrive

Postby kraada » Thu Jun 17, 2010 10:49 am

That does seem a bit larger than expected. Do you have any other programs that use PostgreSQL? For a database with that many hands I'd expect about half (or less) of the hard drive usage you're reporting.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: PostgreSQL is HUGE on my harddrive

Postby puyanwei » Fri Jun 18, 2010 8:46 am

Nope I have nothing else using postgres
puyanwei
 
Posts: 37
Joined: Wed Oct 21, 2009 8:25 am

Re: PostgreSQL is HUGE on my harddrive

Postby kraada » Fri Jun 18, 2010 8:56 am

Did you look to see how much space was being used by the pg_log directory?
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Next

Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 37 guests

cron
highfalutin