PDA

View Full Version : My PostgreSQL is 35GB need space on C:\



lastgamer
01-19-2011, 10:33 AM
Hello,
My PostgreSQL is taking me a lot of space and i dont have more on C:\.Can you tell me some solutions.
Thank You!

fozzy71
01-19-2011, 02:13 PM
Logging:

I would suggest you turn off logging on your new SQL installation as well as these other performance improvements in my signature - 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.



Regarding database maintenance:

You should regularly purge mined hands in your database, after purge vacuum / full analyze the database via pgadmin. You do not want to purge any Hero hands so make sure your alias is properly configured before purging.
FAQ - Hold'em Manager Poker Tracking Software :: Purge Hands from Database (http://faq.holdemmanager.com/questions/100/Purge+Hands+from+Database)
FAQ - Hold'em Manager Poker Tracking Software :: Purge Hands (http://faq.holdemmanager.com/questions/197/Purge+Hands)

Then you can vacuum/analyze - FAQ - Hold'em Manager Poker Tracking Software :: Vacuum Analyze Database (http://faq.holdemmanager.com/questions/88/Vacuum+Analyze+Database+#manual)

Before you defragment you should stop the PostgreSQL service:

Start > Programs > PostgreSQL 8.x > Stop Server

Use your favorite defrag tool. I recommend Smart Defrag.

After defrag I recommend you reboot your PC. If you need to access the DB before rebooting you can start the PostgreSQL service.

Start > Programs > PostgreSQL 8.x > Start Server

lastgamer
06-10-2011, 09:21 AM
Hello,
I have almost the same problem now.My Postgre is 8.8GB but this time i have enough space.The problem is in my Windows Task Manager/Processes the HMIMport.exe is taking a lot of CPU.When i dont do anything it goes to 50% frequently.My PC restarts a lot due to this.
My logging_collector is Off and i deleted the files in my pg_log but my Postgre is not changing its size-its still 8.8GB.
I also made the 1st link for Purge Hands from Database.
Please help me with this case.

Patvs
06-10-2011, 05:27 PM
Read:
http://forums.holdemmanager.com/manager-general/11194-top-10-hem-performance-increase-tips.html


What sort of computer do you have: CPU, RAM, what sort of harddisk?
Which Operating System, Firewall, and Anti-Virus are you using?

Did you add holdemmanager.exe and hmhud.exe as exceptions to the firewall (so the firewall doesn't monitor/scan them)?

Manually update Windows (to install all .net framework updates)
Turn off indexation and compression on the harddisk.

lastgamer
06-10-2011, 06:19 PM
Intel Core Duo 6420 2+2 GB RAM
HDD:250GB on D 50GB on C.
I have a lot of free space.
Windows XP.No firewall.Malwarebytes Anti-Malware anti-virus

It was working ok with the anti-virus.Just from 2 weeks my PC restarts a lot

Patvs
06-10-2011, 07:05 PM
Does your PC also sometimes restart when you're NOT using HoldemManager?
Are these random reboots, or you get a blue screen of death (BSOD)?

Your database is on drive C?
The total size of this harddisk is 50 GB, or you have 50 GB of free space?
What's the total size of the harddisk that has your database?
Is this a regular 5400 / 7200 RPM harddisk or a Solid State Disk?

XP is updated to Service Pack 3?
When you run a Windows Update, there are NO Visual C++, or .net framework updates you can install?

Add exceptions to the windows firewall for \holdem manager\dbcontrolpanel.exe, holdemmanager.exe and hmhud.exe, postres.exe and port: 5432, even if the firewall is turned off.

Run a scandisk on the drive that has the operation system (a scan for bad clusters).

lastgamer
06-11-2011, 04:20 PM
It's from HoldemManager 100%.I tried 4-5 days without it and it never restarted.When im with it it restarts like 4-5 times a day.
They are random reboots yes.No blue screen.

Yes my database is on C.
The total size of the disk is 50GB.26GB are free.
50GB.
Yes its regular 5400 / 7200 RPM harddisk.

No.Its Service Pack 2.
Yes there arent any Visual C++, or .net framework updates i can install.

I think i dont have a firewall.

I runned a scandisk on the drive 2 days ago.

Patvs
06-11-2011, 06:02 PM
Add exceptions to the windows firewall for
holdemmanager.exe
hmhud.exe (=TableManager)
postgres.exe
port: 5432
even if the firewall is turned off.

Update XP to Service Pack 3
Reboot
Run another manual Windows Update
install all updates
Reboot
Run another manual Windows Update
(repeat)


Run a benchmark with CrystalDiskMark on both harddrives:
move your database to the fastest drive.
(or is it just one harddrive.. just using two partitions?)