PDA

View Full Version : relocate postgreSQl folder?



aaron
08-01-2009, 01:25 PM
Hi my postgreSQL folder is like 22 gigabytes and my small c:/ drive is full
so i want to relocate this folder to my other hard disc , but i understood that if i do this my database wont work , i heard something about like i have to export the databse?

anyone any input on this , thanks
Aaron.

fozzy71
08-01-2009, 01:43 PM
Before you do anything, I recommend you export your DB to text files, and make sure you know where your archive of processed hands are located.

How do I export or import hands into and from Holdem Manager? (http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=173)

Your archive location can be verified from Options > Configure Auto Import Folders > Edit > Archive Folder: ______


Now, i would suggest you delete all your useless log files, and turn off logging. This will probably give you a bit more life before you have to move/reinstall SQL. After deleting all these log files and reloading the configuration, you will want to vacuum/analyze, reindex, and defrag (make sure to stop the SQL service before defrag), to clean up the holes from those log files.

Those maintenance items are explained here (along with other things) - http://www.holdemmanager.net/forum/showthread.php?t=11194



Logging:


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.



For moving or reinstalling SQL options, you will want to read these:


I've recently bought a new hard drive and I would like to transfer my Holdem Manager database to the new hard 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)

How do I backup and restore my database? (http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=12)

How do I re-install PostgreSQL and use a previous database? (http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=177)


If you have any questions let me know, and I will be glad to assist in any way necessary.

aaron
08-01-2009, 01:48 PM
omg already tired of reading , dont understand it all , but ill read it slowly step by step lol
tx a lot for the quick reply !
A.

fozzy71
08-01-2009, 02:03 PM
LOL. It is a lot to digest for the first time. I understand. If you have any questions just ask.

aaron
08-01-2009, 04:02 PM
this is what it says in my file , should i just delete the
redirect_stderr = on line and write down what your link says
?
# 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 = on # Enable capturing of stderr into log
# files
# (change requires restart)

fozzy71
08-01-2009, 04:14 PM
No,you only need to change 'on' to 'off':


From this:


redirect_stderr = on # Enable capturing of stderr into log


to this:


redirect_stderr = off # Enable capturing of stderr into log

aaron
08-02-2009, 06:52 AM
Ok dude i think it worked threw away like 16gigabyte , i still dont understand what it is that i threw away but who cares, i just hope my db still works proper:D
thanks for the support!

A.

fozzy71
08-02-2009, 08:40 AM
Ok dude i think it worked threw away like 16gigabyte , i still dont understand what it is that i threw away but who cares, i just hope my db still works proper:D
thanks for the support!

A.

Those log files are turned on by default. They log all kinds of technical info about your DB. For some applications, with massive DBs, where a DB restore or SQL reinstall/reimport is out of the question (massive online DBs, etc), those log files can be used to track down and attempt to fix DB issues. For us as poker players, the performance is much more important, considering most of us could reinstall SQL, and import our hand archives while we sleep. It not only frees space, but frees up your CPU and SQL a bit, because they don't have to write and store the files.

The SQL Performance Tuning is another important step, because the SQL installation by default is set so it can work on the weakest of machines. By tuning SQL to your machine's spec's, it should be able to run a lot easier.

http://www.holdemmanager.net/faq/afmmain.aspx?faqid=172

aaron
08-10-2009, 03:25 PM
hi i now have 2 6 gb folders in my postgreSQl folder one 8.2 and one called 8.3, their like the same size can i delete the 8.2?