PDA

View Full Version : Deleting databases via pgAdmin III, but still 75GB PostgreSQL folder...



pokertx
12-24-2009, 05:09 AM
Hello,

I went into pgAdmin III and deleted all my databases because my hard drive is angry at me, but the PostgreSQL folder still says 75GB, and I investigated to find that the "pg_log" folder contains the vast majority of this 75GB.

There is a generic "postgres" listed under my Databases in pgAdmin III, do I need to delete this one too?.. and that will clean up this "pg_log" folder and free up my hard drive? What is this generic looking "postgres" folder? And are there any dire consequences that result from removing it? Such as not being able to reinstall one of the databases that I previously exported all the HH files from before deleting said database. Sorry for being such a newb.

Thanks in advance for the help guys..
Kevin

Patvs
12-24-2009, 11:12 AM
Don't delete the postgres user in pgAdminIII
Do delete ALL the content of the pg_log folder.

Check my top 10 performance tip thread (in my signature)
One of the steps explains how to STOP making those log files.

pokertx
12-25-2009, 01:33 PM
So it appears I got a bit overzealous and deleted the entire folder before I read this...

Open the pg_log folder and if there are logs in it just delete all of them. Just the logs not the whole pg_log folder. Now close that folder.

Whoooops... man do I feel dumb right now. :o

I created a new empty pg_log folder.. is there anything I need to put back in there that is missing now? And if so, where do I get it....?

Patvs
12-25-2009, 06:22 PM
No it's fine if you create a new empty folder.

fozzy71
12-26-2009, 03:25 PM
I would suggest you turn off logging on your 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