PDA

View Full Version : low disk space ... now what??



zgpwns
01-29-2010, 03:11 PM
i installed postgresql on the wrong disk and did not notice it untill my DB got over 15gb so i would like to transfer my database on a different partition ....

how do i do that ??

fozzy71
01-29-2010, 07:56 PM
Funny timing. I am just getting ready to write this step by step for our FAQ.

So you don't have to wait for that, I will give you the cliff notes version.


When did you install HM and PostgreSQL? Do you have version 8.3 or 8.4? You may be wasting a lot of space in your DB with unnecessary log files. i will post those directions also, in the next post, so they are separated from these instructions.

With 15gb I am going to assume you have 8.3, but I may be wrong.


Please update to the latest beta - http://www.holdemmanager.com/downloads/HmBetaUpdate.exe

For reinstalling SQL to the same DB, follow these steps:

1) Uninstall PostgreSQL from the Windows Control Panel.
2) If you are moving the DB to a different drive/partition, manually cut or copy the \Postgresql\8.x\data directory to it's new location.
3) run the command - start > programs > accessories > command prompt > right-click > run as administrator

net user postgres /delete
4) reboot.
5) Install the same version of PostgreSQL as your current DB using these instructions - http://faq.holdemmanager.com/questions/71/Reinstall+PostgreSQL+Preserving+Old+Database

Those are the instructions for doing it with our 8.3 version we had for a long time. http://www.holdemmanager.com/downloads/postgresql.zip

Unzip that to a new folder before running the installer, if using 8.3.


If you used our new combo installer to install postgresql, use this installer to reinstall. http://www.holdemmanager.com/downloads/postgresql_8.4.1.1.exe

6) If you have moved/installed your DB to a non-default location, please make sure to change the 'Data Directory' path during the installation.

fozzy71
01-29-2010, 07:57 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.
http://faq.holdemmanager.com/questions/100/Purge+Hands+from+Database
http://faq.holdemmanager.com/questions/197/Purge+Hands

Then you can vacuum/analyze - 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

zgpwns
01-29-2010, 10:23 PM
thx, i will try that ... hope i dont screw up something :D

fozzy71
01-30-2010, 02:09 AM
thx, i will try that ... hope i dont screw up something :D

If you aren't sure of anything just ask, or let me know you need some help.

zgpwns
02-13-2010, 02:31 PM
ok, i finnaly ran out of space and decided to do the reinstall of the postgresql

i get this error msg :

the specified data directory is not empty.

If you have an existing database with the same major version number,
you do not need to initialize database cluster.
If you have an existing database with different major version you need to backup your old database and create a new one.

zgpwns
02-13-2010, 02:34 PM
i unselected initialize database cluster
and finnished the install and now HEM refuses to connect to the DB

zgpwns
02-13-2010, 03:04 PM
now i cant even do a clean install ....
i would really apreciate it if someone could contact me via skype

my skype username is zgpwns .... ty

fozzy71
02-13-2010, 06:18 PM
*Please update to the latest beta - http://www.holdemmanager.com/downloads/HmBetaUpdate.exe

1) Uninstall PostgreSQL from the Windows Control Panel.
1a) Move or Delete the \Program Files\PostgreSQL\8.x folder that still has your \data folder in it.
2) Start > Programs > Accessories > Command Prompt > Right-Click > Run As Administrator

net user postgres /delete
3) Reboot.
4) Use our combo installer to reinstall PostgreSQL. Make sure you un-check Holdem Manager during installation. http://www.holdemmanager.com/downloads/Holdem_Manager_Setup.exe


If you are still having problems Please email me at fozzy@holdemmanager.net, with a link to this thread, and your forum name, so we can schedule a Teamviewer session. Download the Teamviewer Quick Support Module - http://www.holdemmanager.net/teamviewer. Please let me know what time zone you are in and what time/days are convenient for you. I schedule support from 12:00 - 22:00 EDT, 7 days a week.

zgpwns
02-13-2010, 07:02 PM
how do u ipload my old DB now that i have done that install

fozzy71
02-13-2010, 08:21 PM
You want to import the hands to the new DB? Wont you just run out of space again? Did you turn off logging on the new DB?

To get all your hands imported to the new DB:

1) Right-Click your Desktop > New > Folder.
2) Go to your \HMArchive folder - To verify the path, go to Options > Configure Auto Import Folders > Edit > Archive Folder: _________.
3) Open that folder and copy the hands (folders of hands) you think it has missed. The archive should be organized by \Month\DayOfMonth (example: D:\HMArchive\2009\07\31). Also get any hand files that are in your \poker site\hand history folder.
4) Paste them into your new desktop folder > HM > Import From Folder.

zgpwns
02-14-2010, 08:29 AM
i wont run out of space becouse the other partition is over 500gb

the hands i m missing are mined hands that are in the data folder of the 8.3 db

zgpwns
02-14-2010, 08:43 AM
update of the problem ... postgre simply will not install on D: ... it always installs it self on C: ....

i m really getting crazy with this ... i rebooted and reinstalled like 10 times now :-/

fozzy71
02-14-2010, 10:56 AM
update of the problem ... postgre simply will not install on D: ... it always installs it self on C: ....

i m really getting crazy with this ... i rebooted and reinstalled like 10 times now :-/

Our combo installer doesnt let you pick the install path for PostgreSQL to simplify the initial install for new customers. If you want to install PostgreSQL to a different drive you have to use a different installer.

This is the same postgresql installed with our combo installer - http://www.holdemmanager.com/downloads/postgresql_8.4.1.1.exe

This is our old PostgreSQL installer we used for years. - http://www.holdemmanager.com/downloads/postgresql.zip



Are you trying to reinstall your 8.3 DB to another drive/partition? You still have your \postgresql\8.3\data folder?

For reinstalling SQL to the same DB, follow these steps:

1) Uninstall PostgreSQL from the Windows Control Panel.
2) If you are moving the DB to a different drive/partition, manually cut or copy the \Postgresql\8.x\data directory to it's new location.
3) run the command - start > programs > accessories > command prompt > right-click > run as administrator

net user postgres /delete
4) reboot.
5) Install the same version of PostgreSQL as your current DB using these instructions - FAQ - Hold'em Manager Poker Tracking Software :: Reinstall PostgreSQL Preserving Old Database (http://faq.holdemmanager.com/questions/71/Reinstall+PostgreSQL+Preserving+Old+Database)
6) If you have moved/installed your DB to a non-default location, please make sure to change the 'Data Directory' path during the installation.


If you still cant sort it out we can setup a teamviewer so I can try to help you.