I have two databases, each around 60GB. However, I am running out of space on drive C. Since I ve got 114gb in Drive D, I am thinking of moving there.
Can I do it?
Thanks
Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators
kraada wrote:You have two options:
(1) Install PostgreSQL twice, on different ports. Put one install in each location, set one to port 5432 (default) the other 5433 (a common secondary port) and just instruct PokerTracker to create the databases you want in the proper locations by setting the port at creation time. This is probably easiest and the closest to foolproof method.
(2) Install a TableSpace - this tells PostgreSQL to put the data table for one particular database in a different physical location on disk. You can do this and set it up to go to a secondary hard drive - see this post for the details.
leviathan74 wrote:As for the first method, that would be easiest, but I already have two 60gb databases to begin with, is there a way to just install a second postgres version and move one of the two databases to the second installation?
WhiteRider wrote:Kraada is on vacation this week and I'm not personally familiar with the method described so I'm not sure what you need to do at that step.
However:leviathan74 wrote:As for the first method, that would be easiest, but I already have two 60gb databases to begin with, is there a way to just install a second postgres version and move one of the two databases to the second installation?
You can install a second version of PostgreSQL to a new location and specify a different port number, then you can run both services at once and choose which to connect to by specifying the appropriate port number. Now you can make a Backup of a database from the old service and restore it to the new service (and once you're happy it's working you can delete it from the old one).
Code: Select all
CREATE TABLESPACE spare_disk LOCATION 'D:\\pg_data';
and hit enter. Please note there are two backslashes. Then type:
Code: Select all
CREATE DATABASE pt3_newdb TABLESPACE spare_disk;
and hit enter. Then type:
Code: Select all
\connect pt3_newdb;
hit enter and the console will change to show that we are now connected to pt3_newdb. Once the console changes, type:
Code: Select all
\cd D:
hit enter and then type:
Code: Select all
\i schema.postgres.sql
Users browsing this forum: No registered users and 57 guests