Skip site navigation (1) Skip section navigation (2)

Creating a second database on the same computer

From: Pg Novice <pgnovice(at)yahoo(dot)co(dot)uk>
To: pgsql-novice(at)postgresql(dot)org
Subject: Creating a second database on the same computer
Date: 2010-08-16 17:42:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
(Postgres 8.4, Windows XP)

I'd like to create a second (and possibly more) database cluster on my computer 
for testing an application. The clusters are never required to be used at the 
same time.

The default location of the cluster is here: "C:\Program 
Files\PostgreSQL\8.4\data". I also have a different database cluster sent to me 
by a colleague. I have placed this in I:\pgsql and used the guide at
to change where Postgres looks for data. This works fine.

I tried to make a new cluster of my own by running ""C:\Program 
Files\PostgreSQL\8.4\bin\initdb" -U postgres -D H:\pgdata". This appears to have 
created the appropriate files but when I try to run the service from the Windows 
services utility or the start menu I get this error:
System error 1069 has occurred. The service did not start due to a logon 
If I try to start the program from the command line using
"C:/Program Files/PostgreSQL/8.4/bin/pg_ctl.exe" runservice -N "postgresql-8.4" 
-D "H:\pgdata" -w
I get the error:
pg_ctl: could not start service "postgresql-8.4": error code 1063

I have run initdb  under both my (admin-rights) username and postgres (which 
required me to set security permissions on the H:\pgdata directory) and using 
the -w option. Both ways give me the above errors, but neither asks for a 
password - authentication is turned off in pg_hba.conf as per default. 

Now the default cluster directory and I:\pgsql also give me the above errors. As 
part of trying things out I have changed the postgres password from and then 
back to what it was originally set to. Does this have anything to do with the 

Does anyone know what I'm doing wrong and how I can create another database 
cluster? (And how can I fix my current cluster!)



pgsql-novice by date

Next:From: Kavitha ParvataneniDate: 2010-08-16 17:52:19
Subject: Remote Connection to server: Connection Refused
Previous:From: Tom LaneDate: 2010-08-16 17:40:02
Subject: Re: How to trap invalid enum input exception?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group