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 _dave_ » Wed Feb 13, 2008 10:54 pm

oops, missed this before.

did you have to do anything different to get it to work?

FWIW, I've run out of space on my root partition a long time ago, so I've been doing this or every alpha / beta build for a long time now
_dave_
 
Posts: 1147
Joined: Sun Dec 09, 2007 6:19 pm

Re: Create new db in a different drive

Postby mattgoody » Thu Feb 14, 2008 10:01 am

No, i followed the same steps. I had already created the new tablespace when beta 3 was out so i used that, but i copied the new schema that came with beta 4 this time. By the way, would upgrading from 8.2 to 8.3 wipe out everything or does postgresql allow for a seamless update?
mattgoody
 
Posts: 24
Joined: Thu Jan 24, 2008 7:41 pm

Re: Create new db in a different drive

Postby omaha » Sun Mar 09, 2008 1:59 am

This sounds like what i really need to speed things up on my new drive!

Unfortunately, with xp home, i cant get past first base! I cannot disable simple file sharing, and according to here,

http://compnetworking.about.com/cs/winx ... nxpsfs.htm

i cant do it in xp home, only in xp pro!

FCKKK ! is there any way of getting this to happen in xp? If i right click on my pg folder, and bring up the sharing tab (no security tab as mentioned previously), and tick share this folder on the network, and then click apply, i get the error message

An error occurred while tryign to share pg data. the server service is not started. The shared resource was not created at this time

ANy ideas?
omaha
 
Posts: 215
Joined: Sat Dec 22, 2007 8:39 pm

Re: Create new db in a different drive

Postby omaha » Sun Mar 09, 2008 2:09 am

I also tried this link about the server service not working,

http://www.winhelponline.com/articles/6 ... ws-XP.html

I had the dll file, and the .sys file was elsewhere on my hard drive, so i copied and pasted it into the drivers folder, but i still get the same error message.
omaha
 
Posts: 215
Joined: Sat Dec 22, 2007 8:39 pm

Re: Create new db in a different drive

Postby omaha » Sun Mar 09, 2008 3:23 am

Okay, i have figured out how to share this file, and that is ok

I open up the pqsl black box thingy, but when i type the create tablespace command, i get the following reply

WAENING: nonstandard use of \\ in a string literal
LINE 1: create tablespace etc etc

Hind use the escape string syntax for backslashes, eg D'\\'
Error directory "D:/pg_data is not empty

A couple of questions- is the quotation marks i am meant to use to the right of the enter key, or to the left of the 1 key, or elsewhere?
omaha
 
Posts: 215
Joined: Sat Dec 22, 2007 8:39 pm

Re: Create new db in a different drive

Postby _dave_ » Sun Mar 09, 2008 1:01 pm

[quote="omaha"7ob]Okay, i have figured out how to share this file, and that is ok

I open up the pqsl black box thingy, but when i type the create tablespace command, i get the following reply

WAENING: nonstandard use of \\ in a string literal
LINE 1: create tablespace etc etc


Hind use the escape string syntax for backslashes, eg D'\\'
Error directory "D:/pg_data is not empty

A couple of questions- is the quotation marks i am meant to use to the right of the enter key, or to the left of the 1 key, or elsewhere?[/quote7ob]
[/quote]

the single quotes near the enter key, (if UK keyboard - no idea about other layouts)

Sounds like d:\pg_data is not empty - it must be. Check this, or make another folder on the D:\ drive that is empty.

Do not worry about file permissions on XP home, it has no such filesystem protection - that stage is needed on XP pro otherwise postgres cannot see the folder.
_dave_
 
Posts: 1147
Joined: Sun Dec 09, 2007 6:19 pm

Re: Create new db in a different drive

Postby hudplz » Mon Mar 10, 2008 9:14 pm

Can I do this with my PTv2? Will it help with imports/PAHUD stat retrieval?
hudplz
 
Posts: 33
Joined: Mon Mar 10, 2008 11:46 am

Re: Create new db in a different drive

Postby _dave_ » Mon Mar 10, 2008 11:02 pm

[quote="hudplz"rpz]Can I do this with my PTv2? Will it help with imports/PAHUD stat retrieval?[/quoterpz]

We do not have ready access to the PT2 schema.sql file, which complicates things. It can be obtained with pg_dump or pgAdmin, but it is probably better to ask pt_pat for the file to be hosted somewhere.

Yes, it will increase stat retrieval speed, providing your new tablespace is on a faster drive. As far as imports go, I do not think the database is the bottleneck in PT2 so I doubt it will be much help (althoug as before, if the new tablespace is as fast / faster, it certainly wont hurt).
_dave_
 
Posts: 1147
Joined: Sun Dec 09, 2007 6:19 pm

Re: Create new db in a different drive

Postby omaha » Tue Mar 11, 2008 11:33 pm

The only thing i have on the drive is the folder, which has the schema in it that folder.

Is the schema meant to be in the folder, or just in the drive?
omaha
 
Posts: 215
Joined: Sat Dec 22, 2007 8:39 pm

Re: Create new db in a different drive

Postby _dave_ » Tue Mar 11, 2008 11:35 pm

The folder *must* be empty - move the schema somewhere else, like the root of the drive. PostgreSQL is careful, and will not make a folder a tablespace if is contains *anything*.

EDIT: it does not matter where the schema actually is, it is only used once - to create the database. All that matters is you know where it is located, so you can type the path to it in the command console - this is why I suggest it be in the root of the drive.
_dave_
 
Posts: 1147
Joined: Sun Dec 09, 2007 6:19 pm

PreviousNext

Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 5 guests

cron
highfalutin