PDA

View Full Version : Post SQL DB filled up laptop and need to move it to external HD....HELP



DubsterVR6
07-02-2009, 11:56 PM
I get 250k hands imported daily and this has filled up my computer. I need to move the existing DB and change where HEM sends the files after importing them. I simply copied and moved 80 gigs (which is the whole Post SQL program and data database) to an external hardrive. Will that work? How can I make HEM send the files to the new "data" file in Post SQL on the external hardrive?

fozzy71
07-03-2009, 12:45 AM
Try this FAQ - I've recently bought a new hard drive and I would like to transfer my Holdem Manager database to the new drive, as it is taking up too much space on my old one. How would I go about doing this? (http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=101)


You should probably turn off logging and delete your log files before you do this. I bet 10 or 20% of that 80gb is useless log files. I helped a custoemr the other day that had a 21GB database, that was made up of over 18GB of log files.

This thread has a lot of performance improvements you can do to your SQL installation and DB as well - http://208.109.95.123/forum/showthread.php?p=62613&posted=1#post62613

These are my cliff notes for turning off logging and deleting the log files.

- 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 Off to On.


------------------------------------------------------------------------------
# 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.

*edit:
- 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 (http://www.ccleaner.com) to clean up all your junk/temporary files. You want to do this before you get to the vacuum and defrag process.

DubsterVR6
07-03-2009, 01:44 PM
My loggin collector has been on this whole time...I only had 778 MB in that pglog folder. Imma check out that thread and see if it helps. Thanks...I know imma be using this thread a few days until I figure it out...I hope you are still around lol I just used CC cleaner and free'd up 21 gigs

fozzy71
07-03-2009, 02:45 PM
LOL

After deleting 21gb a defrag would be a good idea imo. I use Defraggler. Make sure you stop the postgresql service before defragging and start it again after, or reboot.

DubsterVR6
07-13-2009, 09:28 PM
alright I decided to just erase everything but I still have 25 million hand histories. Yes I know it will take me 4 days or wtv just to import them all again. I know the DB is stored in the PostSQL folder and that is the folder I want to put in my hardrive and not in my laptop yet I want HEM to obviously know where that folder is cause it wont be in hardrive C anymore...Im not even aware of how to do that. Is there a link somewhere which has all the steps to setup up a new PostSQL DB and connect it to HEM? thanks

fozzy71
07-13-2009, 10:58 PM
You are completely reinstalling postgresql??


Make sure you delete the postgres user account after uninstalling, and before installing the version I am linking.

- run the command - start > run > cmd >


net user postgres /delete

- reboot.



Download the '1-click' Installer version Version 8.3.7-1 - http://www.enterprisedb.com/products/pgdownload.do

Do NOT download 8.4.0-1

Choose the C drive for your installation and choose the external for the data folder.


http://i207.photobucket.com/albums/bb176/fozzy71/HEM/hm-sql-1click-install.png

http://i207.photobucket.com/albums/bb176/fozzy71/HEM/hm-sql-1click-data.png

DubsterVR6
07-14-2009, 01:57 AM
uhhh ohhh...I did not delete that shit before I uninstalled and deleted it all.

DubsterVR6
07-14-2009, 09:57 PM
what do I do?

fozzy71
07-14-2009, 10:41 PM
Did not delete what?? The postgresuser account? That's fine. If you haven't installed SQL again, you can delete the postgresuser account now, or just create a new user name, such as hmpostgresuser.


If I am way off base, please let me know. Not sure how I missed this earlier, but if you have any problems or questions you can email me directly at fozzy@holdemmanager.net. If you want some help getting it installed properly, I would be able to help you via remote support tomorrow. I should be available pretty much all day.

DubsterVR6
07-15-2009, 04:19 PM
hmm I dont even understand the "rum the command" stuff and however you told me to delete the account up there lol.

fozzy71
07-15-2009, 04:29 PM
In that case, I think a remote support session would be the best solution.

Please email fabio@holdemmanager.net, with a link to this thread, and your forum name, so you can schedule a Teamviewer (http://www.teamviewer.com) session. Download and install the Teamviewer software using all the default settings.

DubsterVR6
07-15-2009, 04:43 PM
aright...imma go buy a 1TB hardrive first then I will contact him.