Create new db in a different drive

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

Re: Create new db in a different drive

Postby hohoho » Mon Feb 02, 2009 1:30 pm

Thanks for that tip.

I have had a further thought - this isn't going to run particularly quickly is it?

I understand this method puts log and xlog on one drive (c) and the data on another drive (d). With two seperate hard drives it seems this is really quick, but potentially slower on my setup (80gig 5400rpm partitioned into c+d).

I guess it's a rhetorical question, but would I be better buying a USB2.0 external hard drive and create my new db on that drive? Therefore having much speed improvement....

I was thinking about one of the Toshiba SecuRed 7200rpm USB drives...
hohoho
 
Posts: 108
Joined: Mon Oct 27, 2008 6:54 am

Re: Create new db in a different drive

Postby kraada » Mon Feb 02, 2009 1:35 pm

Two partitions on the same drive won't increase speed any; the reason it increases speed with two drives is that it avoids having to read and write to different sections on the disc simultaneously.

I would definitely recommend upgrading to that 7200RPM drive. You should notice a significant improvement once you do.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Create new db in a different drive

Postby NWNewell » Tue Mar 10, 2009 4:04 pm

What syntax should I use to get a DB created in a subfolder on a different drive?

C Drive is the operating system, PT3, PostgreSQL install.

D Drive is the data drive that I want to have the databases installed on.

I would like them to be in a " D:\Poker\PokerTracker3Data" folder. But I keep getting errors when I try to CREATE TABLESPACE What syntax should I be using? " CREATE TABLESPACE spare_disk LOCATION 'D:\\poker\pokertracker3data'; "?

Where should I place the schema.postgres.sql file? In the "D:\poker" folder or still in the "D:\" root?
NWNewell
 
Posts: 2
Joined: Wed Jan 07, 2009 12:55 am

Re: Create new db in a different drive

Postby kraada » Tue Mar 10, 2009 4:28 pm

Try:

CREATE TABLESPACE spare_disk LOCATION 'D:/poker/pokertracker3data';

Make sure the data is created and empty; it doesn't matter where the schema lives so long as you pick it out properly when you refer to it at the command line. So it should be in whatever directory you're in when you're running these commands.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Create new db in a different drive

Postby zorglubpok » Tue Aug 21, 2012 4:50 pm

Hi all,

Does this procedure work with Poker Tracker 4 ?
Any feedback welcomed !
Tx
zorglubpok
 
Posts: 5
Joined: Wed Jul 04, 2012 3:49 pm

Re: Create new db in a different drive

Postby kraada » Tue Aug 21, 2012 5:45 pm

It does, the procedure is pretty much identical, you just want to use the PT4 schema.postgres.sql for obvious reasons.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Create new db in a different drive

Postby zorglubpok » Wed Aug 22, 2012 4:50 pm

Ok, tx for answeringmy question, kraada.

But I have another one.

I'm a PT3 user and have installed my postgresql database on a separate drive as explained in this post (for example, PT3 is installed on C:\ drive, and the database on D:\)
I have bought the upgrade to PT4. How can I install PT4 so as to have my data in a PT4 postgresql database on a separate drive too (on D:\) ?

If I run the PT4 installer and convert my PT3 database, all the data will be on the C:\ drive, right ?

Tx for your help.
zorglubpok
 
Posts: 5
Joined: Wed Jul 04, 2012 3:49 pm

Re: Create new db in a different drive

Postby kraada » Wed Aug 22, 2012 5:52 pm

You can create a PT4 database on another disk using a tablespace just as you can for PT3; the only difference is you'll want to use the PT4 schema file in the PokerTracker 4/Schemas folder in program files where it's installed. Create your PT4 database first, then set it as active and default and then you can re-run the conversion via Tools -> Setup Assistant and direct PT4 to convert your data into your new database and you shouldn't have any problems.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Create new db in a different drive

Postby zorglubpok » Sat Sep 08, 2012 2:38 am

Tx it worked fine !
zorglubpok
 
Posts: 5
Joined: Wed Jul 04, 2012 3:49 pm

Previous

Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 5 guests

cron
highfalutin