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 Goomashroom » Tue Apr 01, 2008 6:26 pm

This is great! Thanks for all the help dave! Works like a charm

So I've created a couple databases on my external hard drive and now I actually want to delete/clear one of them because I accidentally imported the wrong hand histories into it. Is there a way to wipe out all the info? Or is it better to just completely delete the database and tablespace? Do you know the commands to do this?

Thanks
Goomashroom
 
Posts: 56
Joined: Sat Feb 02, 2008 12:08 am

Re: Create new db in a different drive

Postby _dave_ » Tue Apr 01, 2008 10:22 pm

You don't ever need to delete a tablespace, and you won't be able to unless it is totally empty anyhow.

The easiest way to delete a whole database is to issue the DROP command from the psql console (as user postgres):[code1dy]DROP DATABASE "postgres_database_name_I_do_not_want";[/code1dy]

you can't undo this, so be careful.

documents: http://www.postgresql.org/docs/8.3/inte ... abase.html

Alternatively, There is a "delete database" button in the PT3 database management that does the same thing.

I think if you actually want rid of a tablespace (like if you misspelled it's name or some other reason) - you can do: "Code]DROP TABLESPACE "tablespace_name_I_do_not_want";[/code]
_dave_
 
Posts: 1147
Joined: Sun Dec 09, 2007 6:19 pm

Re: Create new db in a different drive

Postby lingdog » Thu Apr 03, 2008 8:04 pm

sorry, i m useless with computers. was just wondering, will tablespace only make a difference if the hardrive s faster than the original one? i have three drives on my lap top, C, D and
E, all the same speed, will moving my dataspace from C to E improve import and retrieve speed?
Hope this make sense
Manythanks
Lingdog
lingdog
 
Posts: 6
Joined: Thu Feb 21, 2008 6:35 am

Re: Create new db in a different drive

Postby _dave_ » Thu Apr 03, 2008 10:16 pm

If it is a laptop, I seriously doubt you have three physical hard disk drives. They are likely partitions on a single disk.

If this is the case, making the database on a different drive will in fact make things *slower* - maybe significantly - since the disks read/write head must be continually moving from one partition to the other (imagine it like vinyl records, if you don't know hard disk drive mechanics). Moving from one end of the disk to the other takes a loooong time, in relative terms.

This would be a very good idea if you had say an external fast disk, connected with e-SATA or similar fast interface.
_dave_
 
Posts: 1147
Joined: Sun Dec 09, 2007 6:19 pm

Re: Create new db in a different drive

Postby lingdog » Fri Apr 04, 2008 4:29 am

thanks dave really appreciate your advice, you are right they are only partitions on a single disk. so if i get an fast external drive and connect it through the USB port, will that work?
Thank you again
Lingdog
lingdog
 
Posts: 6
Joined: Thu Feb 21, 2008 6:35 am

Re: Create new db in a different drive

Postby G3K0 » Fri Apr 04, 2008 8:58 am

[quote="_dave_"gy1] connected with e-SATA or similar fast interface.[/quotegy1]

Don't think this is an USB port >> see wiki & table at the bottom of the article [url=http://en.wikipedia.org/wiki/Serial_ATAgy1]clicky[/urlgy1]
G3K0
 
Posts: 24
Joined: Fri Mar 28, 2008 8:39 pm

Re: Create new db in a different drive

Postby Goomashroom » Mon Apr 21, 2008 8:47 pm

So I just bought a new laptop and I'd like to be able to hook up my external USB hard drive that has my PT3 DBs on it.

But when I try running PT3 for the first time, I hit "Browse Databases" and no databases are found. Any suggestions? Thanks.

p.s. The DBs were created on my Windows XP desktop, and my laptop is running Vista
Goomashroom
 
Posts: 56
Joined: Sat Feb 02, 2008 12:08 am

Re: Create new db in a different drive

Postby dark48 » Mon May 12, 2008 6:21 am

Hello, wich is the best way to go for better performance?
1. Installing the poker software(Stars, Fulltilt etc), PostgreSQL, PT3 on the system disk and creating a data base on another hard disk?
or
2. Installing the poker software(Stars, Fulltilt etc),PostgreSQL,PT3 and creating a data base, all on this other hard disk?
Would things go ok in both cases if this other disk is an external hard disk connected via USB 2.0?
dark48
 
Posts: 4
Joined: Mon May 12, 2008 6:06 am

Re: Create new db in a different drive

Postby WhiteRider » Mon May 12, 2008 3:56 pm

Goomashroom wrote:So I just bought a new laptop and I'd like to be able to hook up my external USB hard drive that has my PT3 DBs on it.

But when I try running PT3 for the first time, I hit "Browse Databases" and no databases are found. Any suggestions? Thanks.

p.s. The DBs were created on my Windows XP desktop, and my laptop is running Vista

I don't know the answer to this, but I think I remember reading something like you have to install postgres to the external drive from both computers, so they can both find it..
Please do a search, or I guess a postgres expert may reply..
WhiteRider
Moderator
 
Posts: 54017
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Create new db in a different drive

Postby boomer » Sat May 24, 2008 3:05 am

Never mind. I figured out my issue.
boomer
 
Posts: 1
Joined: Fri May 16, 2008 8:01 pm

PreviousNext

Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 12 guests

cron