Thread: trouble with an older version of postgresql

trouble with an older version of postgresql

From
Krešimir Križanović
Date:

               

Hi, i downloaded telegraphCQ, a datastreaming tool based on postgresql 7.3.2.

 

I managed to install it and some library it needs, and now i have to start postmaster and create a database.

 

Step 1: $ initdb --no-locale -D /home/kkrizan/tcq/pgdata
All goes well
 
Step 2: $ pg_ctl start -D /home/kkrizan/tcq/pgdata -l /home/kkrizan/tcq/log/pglog
All goes well. I can see postmaster process using ps –x.
 
Step 3: $ createdb kkdb
I get an error.
createdb: could not connect to database postgres: FATAL:  Database "postgres" does not exist in the system catalog.
 
Could you give me a few pointers how to solve this error problem?
 
 
Thanks in advance

Kresimir Krizanovic

Re: trouble with an older version of postgresql

From
Mladen Gogala
Date:
Create database "postgres" from psql. It's an empty database, anyway.

On Fri, 2010-02-05 at 11:47 +0100, Krešimir Križanović wrote:
               

Hi, i downloaded telegraphCQ, a datastreaming tool based on postgresql 7.3.2.

 

I managed to install it and some library it needs, and now i have to start postmaster and create a database.

 

Step 1: $ initdb --no-locale -D /home/kkrizan/tcq/pgdata
All goes well
 
Step 2: $ pg_ctl start -D /home/kkrizan/tcq/pgdata -l /home/kkrizan/tcq/log/pglog
All goes well. I can see postmaster process using ps –x.
 
Step 3: $ createdb kkdb
I get an error.
createdb: could not connect to database postgres: FATAL:  Database "postgres" does not exist in the system catalog.
 
Could you give me a few pointers how to solve this error problem?
 
 
Thanks in advance

Kresimir Krizanovic




VMSMladen Gogala
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
www.vmsinfo.com




The Leader in Integrated Media Intelligence Solutions




Attachment

Re: trouble with an older version of postgresql

From
Krešimir Križanović
Date:

 

                I cant start psql. It says:

 

psql: FATAL:  Database "kkrizan" does not exist in the system catalog.

 

'kkrizan' is my username.

 

                K.K.

 

From: Mladen Gogala [mailto:mladen.gogala@vmsinfo.com]
Sent: Saturday, February 06, 2010 12:08 AM
To: Krešimir Križanović
Cc: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] trouble with an older version of postgresql

 

Create database "postgres" from psql. It's an empty database, anyway.

On Fri, 2010-02-05 at 11:47 +0100, Krešimir Križanović wrote:

               

Hi, i downloaded telegraphCQ, a datastreaming tool based on postgresql 7.3.2.

 

I managed to install it and some library it needs, and now i have to start postmaster and create a database.

 

 
Step 1: $ initdb --no-locale -D /home/kkrizan/tcq/pgdata
All goes well
 
Step 2: $ pg_ctl start -D /home/kkrizan/tcq/pgdata -l /home/kkrizan/tcq/log/pglog
All goes well. I can see postmaster process using ps –x.
 
Step 3: $ createdb kkdb
I get an error.
createdb: could not connect to database postgres: FATAL:  Database "postgres" does not exist in the system catalog.
 
Could you give me a few pointers how to solve this error problem?
 
 
Thanks in advance


Kresimir Krizanovic

 

 

VMS

Mladen Gogala
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
www.vmsinfo.com



The Leader in Integrated Media Intelligence Solutions



 

Attachment

Re: trouble with an older version of postgresql

From
Jayadevan M
Date:
Hi,
Probably it is trying to connect to a database  "kkrizan"  which is not there at all. Please try using psql with database option, and specify an existing database name.
Like this
 psql -d PROFICIENT
Regards,
Jayadevan



From:        Krešimir Križanović <Kresimir.Krizanovic@fer.hr>
To:        
Cc:        <pgsql-novice@postgresql.org>
Date:        02/08/2010 03:09 PM
Subject:        Re: [NOVICE] trouble with an older version of postgresql
Sent by:        pgsql-novice-owner@postgresql.org




 
                I cant start psql. It says:
 
psql: FATAL:  Database "kkrizan" does not exist in the system catalog.
 
'kkrizan' is my username.
 
                K.K.
 
From: Mladen Gogala [mailto:mladen.gogala@vmsinfo.com]
Sent:
Saturday, February 06, 2010 12:08 AM
To:
Krešimir Križanović
Cc:
pgsql-novice@postgresql.org
Subject:
Re: [NOVICE] trouble with an older version of postgresql

 
Create database "postgres" from psql. It's an empty database, anyway.

On Fri, 2010-02-05 at 11:47 +0100, Krešimir Križanović wrote:

               

Hi, i downloaded telegraphCQ, a datastreaming tool based on postgresql 7.3.2.



I managed to install it and some library it needs, and now i have to start postmaster and create a database.


 
Step 1: $ initdb --no-locale -D /home/kkrizan/tcq/pgdata
All goes well
 
Step 2: $ pg_ctl start -D /home/kkrizan/tcq/pgdata -l /home/kkrizan/tcq/log/pglog
All goes well. I can see postmaster process using ps –x.
 
Step 3: $ createdb kkdb
I get an error.
createdb: could not connect to database postgres: FATAL:  Database "postgres" does not exist in the system catalog.
 
Could you give me a few pointers how to solve this error problem?
 
 
Thanks in advance

Kresimir Krizanovic

 

 


VMSMladen Gogala
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251

www.vmsinfo.com



The Leader in Integrated Media Intelligence Solutions





 





DISCLAIMER:


"The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect."





Attachment

Re: trouble with an older version of postgresql

From
Krešimir Križanović
Date:

 

 The trouble is there is no database. When i try to create the first one using createdb, i get an error:

createdb: could not connect to database postgres: FATAL:  Database "postgres" does not exist in the system catalog.

 

Someone suggested i create my database using psql. But i cant do that, cant start psql. I havent yet created a single database.

 

K.K.

 

 

 

 

From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Jayadevan M
Sent: Monday, February 08, 2010 11:15 AM
To: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] trouble with an older version of postgresql

 

Hi,
Probably it is trying to connect to a database  "kkrizan"  which is not there at all. Please try using psql with database option, and specify an existing database name.
Like this
 psql -d PROFICIENT
Regards,
Jayadevan



From:        Krešimir Križanović <Kresimir.Krizanovic@fer.hr>
To:        
Cc:        <pgsql-novice@postgresql.org>
Date:        02/08/2010 03:09 PM
Subject:        Re: [NOVICE] trouble with an older version of postgresql
Sent by:        pgsql-novice-owner@postgresql.org





 
                I cant start psql. It says:
 
psql: FATAL:  Database "kkrizan" does not exist in the system catalog.
 
'kkrizan' is my username.
 
                K.K.
 
From: Mladen Gogala [mailto:mladen.gogala@vmsinfo.com]
Sent:
Saturday, February 06, 2010 12:08 AM
To:
Krešimir Križanović
Cc:
pgsql-novice@postgresql.org
Subject:
Re: [NOVICE] trouble with an older version of postgresql

 
Create database "postgres" from psql. It's an empty database, anyway.

On Fri, 2010-02-05 at 11:47 +0100, Krešimir Križanović wrote:
               

Hi, i downloaded telegraphCQ, a datastreaming tool based on postgresql 7.3.2.



I managed to install it and some library it needs, and now i have to start postmaster and create a database.


 
Step 1: $ initdb --no-locale -D /home/kkrizan/tcq/pgdata
All goes well
 
Step 2: $ pg_ctl start -D /home/kkrizan/tcq/pgdata -l /home/kkrizan/tcq/log/pglog
All goes well. I can see postmaster process using ps –x.
 
Step 3: $ createdb kkdb
I get an error.
createdb: could not connect to database postgres: FATAL:  Database "postgres" does not exist in the system catalog.
 
Could you give me a few pointers how to solve this error problem?
 
 
Thanks in advance

Kresimir Krizanovic

 

 

 

VMS

Mladen Gogala
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
www.vmsinfo.com

 

The Leader in Integrated Media Intelligence Solutions


 



Image removed by sender.

DISCLAIMER:


"The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect."




Attachment

Re: trouble with an older version of postgresql

From
Joshua Tolley
Date:
On Mon, Feb 08, 2010 at 02:26:50PM +0100, Krešimir Križanović wrote:
>     The trouble is there is no database. When i try to create the first one
>    using createdb, i get an error:
>
>    createdb: could not connect to database postgres: FATAL:  Database
>    "postgres" does not exist in the system catalog.

See if you have a file called global/pg_database in your data directory. It
should be plain text, and contain a list of all the databases that exist. One
of them is probably called "template1", and you should be able to connect to
that. Note that 7.3 is awfully old, and you're unlikly to get much support for
it beyond "Upgrade immediately if not sooner."

--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com

Attachment

Re: trouble with an older version of postgresql

From
Tom Lane
Date:
=?UTF-8?B?S3JlxaFpbWlyIEtyacW+YW5vdmnEhw==?= <Kresimir.Krizanovic@fer.hr> writes:
>  The trouble is there is no database. When i try to create the first one using createdb, i get an error:

> createdb: could not connect to database postgres: FATAL:  Database "postgres" does not exist in the system catalog.

It looks like you are trying to use a newer version of the client-side
tools with an older server.  The "database does not exist" message
hasn't been spelled exactly that way since 7.3, so your server is at
least that old (and thus way, way, way overdue for an update :-().
Recent versions of the client tools assume that a database named
"postgres" exists, but we didn't start creating one of those by
default until 8.1 or so.

What you'll need to do is tell the client program to connect to one
of the databases that does exist.  Try "template1" for starters.
If you feel like it, you can then create a database named "postgres"
so that the client default works --- but it'd be more useful to
spend your time on retiring that ancient server in favor of something
more modern.

            regards, tom lane

Re: trouble with an older version of postgresql

From
Mladen Gogala
Date:
  1. Do it as the user postgres.
  2. If the database postgres doesn't exist, use the following command line: psql -d template1
  3. Run "create database postgres;"
That should be it. Please, also verify tthat your postgres instance is started. You can do that like this:
[mgogala@medo ~]$ ps -fu postgres
UID        PID  PPID  C STIME TTY          TIME CMD
postgres  4991     1  0 08:43 ?        00:00:00 /usr/bin/postmaster -p 5432 -D /
postgres  4993  4991  0 08:43 ?        00:00:00 postgres: logger process      
postgres  4995  4991  0 08:43 ?        00:00:00 postgres: writer process      
postgres  4996  4991  0 08:43 ?        00:00:00 postgres: wal writer process  
postgres  4997  4991  0 08:43 ?        00:00:00 postgres: autovacuum launcher pr
postgres  4998  4991  0 08:43 ?        00:00:00 postgres: stats collector proces
[mgogala@medo ~]$
If the postmaster, wal writer and writer process are present, your instance is started properly and there is no reason for this to fail. The template1 database should be present if your installation was successful. If you don't have the template1 database, your installation is no good and you should redo it.

On Mon, 2010-02-08 at 10:40 +0100, Krešimir Križanović wrote:
 

                I cant start psql. It says:

 

psql: FATAL:  Database "kkrizan" does not exist in the system catalog.

 

'kkrizan' is my username.

 

                K.K.

 

From: Mladen Gogala [mailto:mladen.gogala@vmsinfo.com]
Sent: Saturday, February 06, 2010 12:08 AM
To: Krešimir Križanović
Cc: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] trouble with an older version of postgresql


 

Create database "postgres" from psql. It's an empty database, anyway.

On Fri, 2010-02-05 at 11:47 +0100, Krešimir Križanović wrote:

               

Hi, i downloaded telegraphCQ, a datastreaming tool based on postgresql 7.3.2.

 

I managed to install it and some library it needs, and now i have to start postmaster and create a database.

 

 
Step 1: $ initdb --no-locale -D /home/kkrizan/tcq/pgdata
All goes well
 
Step 2: $ pg_ctl start -D /home/kkrizan/tcq/pgdata -l /home/kkrizan/tcq/log/pglog
All goes well. I can see postmaster process using ps –x.
 
Step 3: $ createdb kkdb
I get an error.
createdb: could not connect to database postgres: FATAL:  Database "postgres" does not exist in the system catalog.
 
Could you give me a few pointers how to solve this error problem?
 
 
Thanks in advance


Kresimir Krizanovic



 

 

VMS


Mladen Gogala
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
www.vmsinfo.com






The Leader in Integrated Media Intelligence Solutions







 


-- 
Mladen Gogala 
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
www.vmsinfo.com 
Attachment