Thread: Cannot install postgreSQL
Hi, Ok, ok, I totally agree that this question should be posted to the Novice mailing list (that's what I did before but to no avail). My only (lame) excuse is that is about administrating postgresql. I've a running postgresql db on one machine and I want to install it on a second one. The problem is: I get an error I definitely haven't got when I installed it the first time. This is the result when I'm running initdb (initdb --pglib=... --username=romkur). The PGDATA environment variable is set correctly: <OUTPUT> We are initializing the database system with username romkur (uid=1005). This user will own all the files and must also own the server process. Creating Postgres database system directory /postgresql/pgsql/data Creating Postgres database system directory /postgresql/pgsql/data/base Creating template database in /postgresql/pgsql/data/base/template1 Creating global classes in /postgresql/pgsql/data/base Adding template1 database to pg_database... Vacuuming template1 Creating public pg_user view Creating view pg_rules Creating view pg_views Creating view pg_tables Creating view pg_indexes Loading pg_description </OUTPUT> Seems OK to me, but when I run postgres (after starting the ipc daemon) with: postgres.exe -i I get the following error-message: <OUTPUT> FATAL 1: Database romkur does not exist in pg_database FATAL 1: Database romkur does not exist in pg_database </OUTPUT> Does anybody know a work-around for this problem? Thanks in advance, Roman PS: /etc/passwd exists and it contains the correct UID. I'm using Windows NT with Cygnus b20. The same error occurs with postgresql 6.5 and 6.5.3. -- Roman Kurmanowytsch Vienna, Austria e-mail: romank@infosys.tuwien.ac.at icq: 55302169 pgp, www: http://stud4.tuwien.ac.at/~e9327324/
Roman Kurmanowytsch wrote: >Seems OK to me, but when I run postgres (after starting the ipc daemon) with >: >postgres.exe -i >I get the following error-message: > ><OUTPUT> >FATAL 1: Database romkur does not exist in pg_database >FATAL 1: Database romkur does not exist in pg_database ></OUTPUT> > There is no database called "romkur", because you haven't yet created it. When initdb is run, it creates a database called template1; this is the only database that exists until you create some more. When you try to connect as a database user, postgres assumes you want your eponymous database, unless you tell it different. So tell it you want to connect to template1. -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver PGP key from public servers; key ID 32B8FAA1 ======================================== "Go ye therefore, and teach all nations, baptizing them in the name of the Father, and of the Son, and of the Holy Ghost; Teaching them to observe all things whatsoever I have commanded you; and, lo, I am with you alway, even unto the end of the world. Amen." Matthew 28:19,20
Oliver, >There is no database called "romkur", because you haven't yet created it. > >When initdb is run, it creates a database called template1; this is the >only database that exists until you create some more. > >When you try to connect as a database user, postgres assumes you want >your eponymous database, unless you tell it different. So tell it >you want to connect to template1. Sorry, I don't get it. From the postgresql-6.5.2/INSTALL file: ------------------------------------------------------ ... 18. $ initdb... 19. Set up permissions to access the database... 20. Briefly test that the backend will start and run by running it from the command line. a. Start the postmaster daemon running in the background by typing $ cd $ nohup postmaster -i > pgserver.log 2>&1 & ... ------------------------------------------------------ And at this point it crashes. I'm not able to run the postmaster to create a new db (or access an old one). I am not trying to run psql (which needs the db name it should access). Cheers, Roman -- Roman Kurmanowytsch Vienna, Austria e-mail: romank@infosys.tuwien.ac.at icq: 55302169 pgp, www: http://stud4.tuwien.ac.at/~e9327324/
On Tue, Mar 07, 2000 at 07:44:39PM +0100, Roman Kurmanowytsch wrote: > Oliver, > > >There is no database called "romkur", because you haven't yet created it. > > > >When initdb is run, it creates a database called template1; this is the > >only database that exists until you create some more. > > > >When you try to connect as a database user, postgres assumes you want > >your eponymous database, unless you tell it different. So tell it > >you want to connect to template1. > > Sorry, I don't get it. > > >From the postgresql-6.5.2/INSTALL file: > ------------------------------------------------------ > ... > 18. $ initdb... > 19. Set up permissions to access the database... > 20. Briefly test that the backend will start and > run by running it from the command line. > a. Start the postmaster daemon running in the > background by typing > $ cd > $ nohup postmaster -i > pgserver.log 2>&1 & > ... > ------------------------------------------------------ From your first post to HACKERS: > Seems OK to me, but when I run postgres (after starting the ipc daemon) with: > postgres.exe -i > I get the following error-message: > Postgres is different than postmaster. Although they're the same executable, you get different behavior based on the name it's invoked as. As postmaster, it's the daemon that serves incoming connections. As postgres, it starts up a 'backend' proceess that access the db files. So, yes, by running postgres.exe you _were_ trying to access the database romkur. Ross -- Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu> NSBRI Research Scientist/Programmer Computer and Information Technology Institute Rice University, 6100 S. Main St., Houston, TX 77005
"Ross J. Reedstrom" wrote: >On Tue, Mar 07, 2000 at 07:44:39PM +0100, Roman Kurmanowytsch wrote: >Postgres is different than postmaster. Although they're the same >executable, you get different behavior based on the name it's invoked >as. As postmaster, it's the daemon that serves incoming connections. As >postgres, it starts up a 'backend' proceess that access the db files. So, >yes, by running postgres.exe you _were_ trying to access the database >romkur. I thought maybe this was a weird feature of the Windows implementation, which I have never seen; of course, the normal PostgreSQL frontend is psql, not postgres. I think psql[.exe?] is what you should be running. -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver PGP key from public servers; key ID 32B8FAA1 ======================================== "Go ye therefore, and teach all nations, baptizing them in the name of the Father, and of the Son, and of the Holy Ghost; Teaching them to observe all things whatsoever I have commanded you; and, lo, I am with you alway, even unto the end of the world. Amen." Matthew 28:19,20
Ross, Thanks for your reply. >Postgres is different than postmaster. Although they're the same >executable, you get different behavior based on the name it's invoked >as. As postmaster, it's the daemon that serves incoming connections. As >postgres, it starts up a 'backend' proceess that access the db files. So, >yes, by running postgres.exe you _were_ trying to access the database >romkur. Ouch. After a long struggle with Cygwin I finally managed to start the postmaster (I had to create a new symbolic link because the installed one doesn't work - even with System-attribute set). Thanks again for your help, Roman -- Roman Kurmanowytsch Vienna, Austria e-mail: romank@infosys.tuwien.ac.at icq: 55302169 pgp, www: http://stud4.tuwien.ac.at/~e9327324/