PDA

View Full Version : Freeing disk space



nosmith
12-21-2009, 11:08 AM
I have purged a lot of hands form my database (well over 5 million) then i went on to pg admin and ran a manual vaccuam. However the size of my database has not changed it is still 70GB.

How else can i get the size of my database down? as its taking up too much room.

fozzy71
12-21-2009, 02:41 PM
Logging:

I would suggest you turn off logging on your new SQL installation as well as these other performance improvements - Top 10: HEM performance increase tips


To turn off logging, follow these instructions. This is the first thing I do anytime I install SQL for someone.

- Start > My Computer > Tools > Folder Options > View > UnCheck 'Hide Extensions for known file types' > OK

- C:\Program Files\PostgreSQL\data\postgresql.conf > Right-Click > Open With.. > NotePad > Check 'Always use this program'

- Scroll about half way down to ~Lines 245 - 260:

- The last line of this block of code, for the 'logging_collector', must be changed from On to Off.



------------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#------------------------------------------------------------------------------

# - Where to Log -

log_destination = 'stderr' # Valid values are combinations of
# stderr, csvlog, syslog and eventlog,
# depending on platform. csvlog
# requires logging_collector to be on.

# This is used when logging to stderr:
logging_collector = off # Enable capturing of stderr and csvlog


File > Save; File > Close

Start > Programs > PostgreSQL 8.3 > Reload Configuration.


- Start > My Computer > C:\Program Files\PostgreSQL\data\pg_log, or C:\Program Files (x86)\PostgreSQL\data\pg_log, if you have 64 bit Vista. Delete all files in that folder. And it might be a good idea to empty your recycle bin at that point, or use a 3rd party utility like CCleaner to clean up all your junk/temporary files. You want to do this before you get to the vacuum and defrag process.


You should regularly purge mined hands in your database, after purge vacuum / full analyze the database via pgadmin.
http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=107
http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=163


I would suggest you do the majority of the things in this thread: http://www.holdemmanager.net/forum/showthread.php?t=11194

Some of the most important things, imo:

- Remove the WinnerName, WinnerCards and WinnerWon from the Options > Hands View Column Selecto
- Turning off logging and deleting existing logs
- Vacuum/Full/Analyze, then Reindex - http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=163
- Defrag last and make sure you stop the postgresql service before you defrag. I personally use Smart Defrag.
- Do a Cold Boot (Shut Down > Start) before you use HM again

nosmith
12-22-2009, 01:02 PM
Thanks for the answer. I am doing the other things that you suggest but my postgresql set up file doesnt have the logging collecter.

#---------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#---------------------------------------------------------------------------

# - Where to Log -

log_destination = 'stderr' # Valid values are combinations of
# stderr, syslog and eventlog,
# depending on platform.

# This is used when logging to stderr:
redirect_stderr = off # Enable capturing of stderr into log
# files
# (change requires restart)

This is the closest thing that i can find. Im sorry i dont know how to put in a html quote like you did so i hope you understand this.

I am using version 8.2 and not 8.2 does this make a difference?

fozzy71
12-22-2009, 06:02 PM
This is the same thing, turning off your logs.


redirect_stderr = off