pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
WARNING: psql version 8.4, server version 9.2.
7+ messages / 5 participants
[nested] [flat]

* WARNING: psql version 8.4, server version 9.2.
@ 2014-11-03 22:32  Davenport, Julie <JDavenport@ctcd.edu>
  0 siblings, 2 replies; 7+ messages in thread

From: Davenport, Julie @ 2014-11-03 22:32 UTC (permalink / raw)
  To: pgsql-admin

Hello,
I installed Postgres 9.2 on a new server that has Redhat Enterprise Linux 6, which came with Postgres 8.4.  I did not want to use the 8.4 and never ran initdb on it.  Instead, I installed postgres 9.2 via yum and di the initdb, etc, on 9.2 and have been using only that version.  I have the postgres 8.4 service shut down and set to not start up upon reboot.  Whenever I log into one of my databases, I always get this warning:

-bash-4.1$ psql testdb
psql (8.4.13, server 9.2.9)
WARNING: psql version 8.4, server version 9.2.
         Some psql features might not work.
Type "help" for help.
testdb =#

Inside the database it says it is version 9.2:
testdb =# select version();
                                                   version
--------------------------------------------------------------------------------------------------------------
PostgreSQL 9.2.9 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4), 64-bit
(1 row)

testdb =#

And the version file of the database says it is 9.2:
-bash-4.1$ cat /var/lib/pgsql/9.2/data/PG_VERSION
9.2
-bash-4.1$

So how can my server have psql 8.4, but server 9.2?  So far I have not noticed any problems with the databases and queries against them work, but could it become a problem at some time?  Do I have to do something to upgrade the psql 8.4 to 9.2?

Thanks for any advice,
Julie

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: WARNING: psql version 8.4, server version 9.2.
@ 2014-11-03 22:38  Payal Singh <payal@omniti.com>
  parent: Davenport, Julie <JDavenport@ctcd.edu>
  1 sibling, 1 reply; 7+ messages in thread

From: Payal Singh @ 2014-11-03 22:38 UTC (permalink / raw)
  To: Davenport, Julie <JDavenport@ctcd.edu>; +Cc: pgsql-admin

the psql binary you are using to connect is default binary that is 8.4.
This message just means that the psql client is of an older version than
the database.

To correct this you can modify the default path to point to psql binary of
your newly installed postgres version.

Payal Singh,
Database Administrator,
OmniTI Computer Consulting Inc.
Phone: 240.646.0770 x 253

On Mon, Nov 3, 2014 at 5:32 PM, Davenport, Julie <JDavenport@ctcd.edu>
wrote:

>  Hello,
>
> I installed Postgres 9.2 on a new server that has Redhat Enterprise Linux
> 6, which came with Postgres 8.4.  I did not want to use the 8.4 and never
> ran initdb on it.  Instead, I installed postgres 9.2 via yum and di the
> initdb, etc, on 9.2 and have been using only that version.  I have the
> postgres 8.4 service shut down and set to not start up upon reboot.
> Whenever I log into one of my databases, I always get this warning:
>
>
>
> -bash-4.1$ psql testdb
>
> psql (8.4.13, server 9.2.9)
>
> WARNING: psql version 8.4, server version 9.2.
>
>          Some psql features might not work.
>
> Type "help" for help.
>
> testdb =#
>
>
>
> Inside the database it says it is version 9.2:
>
> testdb =# select version();
>
>                                                    version
>
>
> --------------------------------------------------------------------------------------------------------------
>
> PostgreSQL 9.2.9 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7
> 20120313 (Red Hat 4.4.7-4), 64-bit
>
> (1 row)
>
>
>
> testdb =#
>
>
>
> And the version file of the database says it is 9.2:
>
> -bash-4.1$ cat /var/lib/pgsql/9.2/data/PG_VERSION
>
> 9.2
>
> -bash-4.1$
>
>
>
> So how can my server have psql 8.4, but server 9.2?  So far I have not
> noticed any problems with the databases and queries against them work, but
> could it become a problem at some time?  Do I have to do something to
> upgrade the psql 8.4 to 9.2?
>
>
>
> Thanks for any advice,
>
> Julie
>

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: WARNING: psql version 8.4, server version 9.2.
@ 2014-11-03 23:55  jayknowsunix@gmail.com
  parent: Payal Singh <payal@omniti.com>
  0 siblings, 1 reply; 7+ messages in thread

From: jayknowsunix@gmail.com @ 2014-11-03 23:55 UTC (permalink / raw)
  To: Payal Singh <payal@omniti.com>; +Cc: Davenport, Julie <JDavenport@ctcd.edu>; pgsql-admin

Correct. More than likely, the path is giving the version in /usr/bin, and your new installation is something like /usr/pgsql-9.2/bin. You might want remove the package that came with your linux installation, that will save you a lot of grief later.
--
Jay

Sent from my iPad

> On Nov 3, 2014, at 5:38 PM, Payal Singh <payal@omniti.com> wrote:
> 
> the psql binary you are using to connect is default binary that is 8.4. This message just means that the psql client is of an older version than the database. 
> 
> To correct this you can modify the default path to point to psql binary of your newly installed postgres version. 
> 
> Payal Singh,
> Database Administrator,
> OmniTI Computer Consulting Inc.
> Phone: 240.646.0770 x 253
> 
>> On Mon, Nov 3, 2014 at 5:32 PM, Davenport, Julie <JDavenport@ctcd.edu> wrote:
>> Hello,
>> 
>> I installed Postgres 9.2 on a new server that has Redhat Enterprise Linux 6, which came with Postgres 8.4.  I did not want to use the 8.4 and never ran initdb on it.  Instead, I installed postgres 9.2 via yum and di the initdb, etc, on 9.2 and have been using only that version.  I have the postgres 8.4 service shut down and set to not start up upon reboot.  Whenever I log into one of my databases, I always get this warning:
>> 
>>  
>> 
>> -bash-4.1$ psql testdb
>> 
>> psql (8.4.13, server 9.2.9)
>> 
>> WARNING: psql version 8.4, server version 9.2.
>> 
>>          Some psql features might not work.
>> 
>> Type "help" for help.
>> 
>> testdb =#
>> 
>>  
>> 
>> Inside the database it says it is version 9.2:
>> 
>> testdb =# select version();
>> 
>>                                                    version
>> 
>> --------------------------------------------------------------------------------------------------------------
>> 
>> PostgreSQL 9.2.9 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4), 64-bit
>> 
>> (1 row)
>> 
>>  
>> 
>> testdb =#
>> 
>>  
>> 
>> And the version file of the database says it is 9.2:
>> 
>> -bash-4.1$ cat /var/lib/pgsql/9.2/data/PG_VERSION
>> 
>> 9.2
>> 
>> -bash-4.1$
>> 
>>  
>> 
>> So how can my server have psql 8.4, but server 9.2?  So far I have not noticed any problems with the databases and queries against them work, but could it become a problem at some time?  Do I have to do something to upgrade the psql 8.4 to 9.2?
>> 
>>  
>> 
>> Thanks for any advice,
>> 
>> Julie
>> 
> 

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: WARNING: psql version 8.4, server version 9.2.
@ 2014-11-04 04:36  Shreeyansh dba <shreeyansh2014@gmail.com>
  parent: Davenport, Julie <JDavenport@ctcd.edu>
  1 sibling, 1 reply; 7+ messages in thread

From: Shreeyansh dba @ 2014-11-04 04:36 UTC (permalink / raw)
  To: Davenport, Julie <JDavenport@ctcd.edu>; +Cc: pgsql-admin

I suspect there is 8.4 is installed on the server.
check psql version whether it is 9.2 or 8.4
To check psql version psql -V it will show version of psql if it is 8.4
then set .bash_profile to 9.2 binaries.
Go to home directory of postgres and edit .bash_profile
vim .bash_profile
export PATH=/path till bin/:$PATH and save the file this will help you to
solve the issue.


Thanks and regards,
Rajesh
Database Administrator
www.shreeyansh.com.

On Tue, Nov 4, 2014 at 4:02 AM, Davenport, Julie <JDavenport@ctcd.edu>
wrote:

>  Hello,
>
> I installed Postgres 9.2 on a new server that has Redhat Enterprise Linux
> 6, which came with Postgres 8.4.  I did not want to use the 8.4 and never
> ran initdb on it.  Instead, I installed postgres 9.2 via yum and di the
> initdb, etc, on 9.2 and have been using only that version.  I have the
> postgres 8.4 service shut down and set to not start up upon reboot.
> Whenever I log into one of my databases, I always get this warning:
>
>
>
> -bash-4.1$ psql testdb
>
> psql (8.4.13, server 9.2.9)
>
> WARNING: psql version 8.4, server version 9.2.
>
>          Some psql features might not work.
>
> Type "help" for help.
>
> testdb =#
>
>
>
> Inside the database it says it is version 9.2:
>
> testdb =# select version();
>
>                                                    version
>
>
> --------------------------------------------------------------------------------------------------------------
>
> PostgreSQL 9.2.9 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7
> 20120313 (Red Hat 4.4.7-4), 64-bit
>
> (1 row)
>
>
>
> testdb =#
>
>
>
> And the version file of the database says it is 9.2:
>
> -bash-4.1$ cat /var/lib/pgsql/9.2/data/PG_VERSION
>
> 9.2
>
> -bash-4.1$
>
>
>
> So how can my server have psql 8.4, but server 9.2?  So far I have not
> noticed any problems with the databases and queries against them work, but
> could it become a problem at some time?  Do I have to do something to
> upgrade the psql 8.4 to 9.2?
>
>
>
> Thanks for any advice,
>
> Julie
>

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: WARNING: psql version 8.4, server version 9.2.
@ 2014-11-04 22:57  Davenport, Julie <JDavenport@ctcd.edu>
  parent: jayknowsunix@gmail.com
  0 siblings, 1 reply; 7+ messages in thread

From: Davenport, Julie @ 2014-11-04 22:57 UTC (permalink / raw)
  To: jayknowsunix@gmail.com <jayknowsunix@gmail.com>; Payal Singh <payal@omniti.com>; +Cc: pgsql-admin

Thank you Jay and Payal, you were right, the wrong bin was in use:

# ll /usr/bin/psql
-rwxr-xr-x 1 root root 342832 Aug 27  2012 /usr/bin/psql                 (8.4 binary)


# ll /usr/pgsql-9.2/bin/psql
-rwxr-xr-x 1 root root 439352 Jul 22 11:25 /usr/pgsql-9.2/bin/psql      (9.2 binary)

# which psql
/usr/bin/psql

8.4 was being used

Julie

From: jayknowsunix@gmail.com [mailto:jayknowsunix@gmail.com]
Sent: Monday, November 03, 2014 5:55 PM
To: Payal Singh
Cc: Davenport, Julie; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] WARNING: psql version 8.4, server version 9.2.

Correct. More than likely, the path is giving the version in /usr/bin, and your new installation is something like /usr/pgsql-9.2/bin. You might want remove the package that came with your linux installation, that will save you a lot of grief later.
--
Jay

Sent from my iPad

On Nov 3, 2014, at 5:38 PM, Payal Singh <payal@omniti.com<mailto:payal@omniti.com>> wrote:
the psql binary you are using to connect is default binary that is 8.4. This message just means that the psql client is of an older version than the database.
To correct this you can modify the default path to point to psql binary of your newly installed postgres version.

Payal Singh,
Database Administrator,
OmniTI Computer Consulting Inc.
Phone: 240.646.0770 x 253

On Mon, Nov 3, 2014 at 5:32 PM, Davenport, Julie <JDavenport@ctcd.edu<mailto:JDavenport@ctcd.edu>> wrote:
Hello,
I installed Postgres 9.2 on a new server that has Redhat Enterprise Linux 6, which came with Postgres 8.4.  I did not want to use the 8.4 and never ran initdb on it.  Instead, I installed postgres 9.2 via yum and di the initdb, etc, on 9.2 and have been using only that version.  I have the postgres 8.4 service shut down and set to not start up upon reboot.  Whenever I log into one of my databases, I always get this warning:

-bash-4.1$ psql testdb
psql (8.4.13, server 9.2.9)
WARNING: psql version 8.4, server version 9.2.
         Some psql features might not work.
Type "help" for help.
testdb =#

Inside the database it says it is version 9.2:
testdb =# select version();
                                                   version
--------------------------------------------------------------------------------------------------------------
PostgreSQL 9.2.9 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4), 64-bit
(1 row)

testdb =#

And the version file of the database says it is 9.2:
-bash-4.1$ cat /var/lib/pgsql/9.2/data/PG_VERSION
9.2
-bash-4.1$

So how can my server have psql 8.4, but server 9.2?  So far I have not noticed any problems with the databases and queries against them work, but could it become a problem at some time?  Do I have to do something to upgrade the psql 8.4 to 9.2?

Thanks for any advice,
Julie



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: WARNING: psql version 8.4, server version 9.2.
@ 2014-11-04 23:09  Davenport, Julie <JDavenport@ctcd.edu>
  parent: Shreeyansh dba <shreeyansh2014@gmail.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Davenport, Julie @ 2014-11-04 23:09 UTC (permalink / raw)
  To: Shreeyansh dba <shreeyansh2014@gmail.com>; +Cc: pgsql-admin

Thank you Rajesh for the instructions on how to set the PATH in the .bash_profile.

You are correct, the version in use is the 8.4:

# psql -V
psql (PostgreSQL) 8.4.13
contains support for command-line editing

I found the .bash_profile only under the home directory for 8.4 (/var/lib/pgsql), not for 9.2 (/var/lib/pgsql/9.2)

So I copied the /var/lib/pgsql/.bash_profile to /var/lib/pgsql/9.2/ and modified it there to include the PATH, which it did not have before:

-bash-4.1$ cat /var/lib/pgsql/9.2/.bash_profile
[ -f /etc/profile ] && source /etc/profile
PGDATA=/var/lib/pgsql/9.2/data
export PGDATA
PATH=/usr/pgsql-9.2/bin/:$PATH
export PATH
-bash-4.1$

Then I restarted the postgresql-9.2 service and then logged into one of my databases.  It worked -- I no longer get the warning, and it shows that it is using 9.2 psql, not 8.4 psql:

# su - postgres

-bash-4.1$ psql testdb
psql (9.2.9)
Type "help" for help.

testdb=#


Thanks again!
Julie


From: Shreeyansh dba [mailto:shreeyansh2014@gmail.com]
Sent: Monday, November 03, 2014 10:36 PM
To: Davenport, Julie
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] WARNING: psql version 8.4, server version 9.2.

I suspect there is 8.4 is installed on the server.
check psql version whether it is 9.2 or 8.4
To check psql version psql -V it will show version of psql if it is 8.4 then set .bash_profile to 9.2 binaries.
Go to home directory of postgres and edit .bash_profile
vim .bash_profile
export PATH=/path till bin/:$PATH and save the file this will help you to solve the issue.


Thanks and regards,
Rajesh
Database Administrator
www.shreeyansh.com<http://www.shreeyansh.com;.

On Tue, Nov 4, 2014 at 4:02 AM, Davenport, Julie <JDavenport@ctcd.edu<mailto:JDavenport@ctcd.edu>> wrote:
Hello,
I installed Postgres 9.2 on a new server that has Redhat Enterprise Linux 6, which came with Postgres 8.4.  I did not want to use the 8.4 and never ran initdb on it.  Instead, I installed postgres 9.2 via yum and di the initdb, etc, on 9.2 and have been using only that version.  I have the postgres 8.4 service shut down and set to not start up upon reboot.  Whenever I log into one of my databases, I always get this warning:

-bash-4.1$ psql testdb
psql (8.4.13, server 9.2.9)
WARNING: psql version 8.4, server version 9.2.
         Some psql features might not work.
Type "help" for help.
testdb =#

Inside the database it says it is version 9.2:
testdb =# select version();
                                                   version
--------------------------------------------------------------------------------------------------------------
PostgreSQL 9.2.9 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4), 64-bit
(1 row)

testdb =#

And the version file of the database says it is 9.2:
-bash-4.1$ cat /var/lib/pgsql/9.2/data/PG_VERSION
9.2
-bash-4.1$

So how can my server have psql 8.4, but server 9.2?  So far I have not noticed any problems with the databases and queries against them work, but could it become a problem at some time?  Do I have to do something to upgrade the psql 8.4 to 9.2?

Thanks for any advice,
Julie



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: WARNING: psql version 8.4, server version 9.2.
@ 2014-11-07 17:46  Devrim Gündüz <devrim@gunduz.org>
  parent: Davenport, Julie <JDavenport@ctcd.edu>
  0 siblings, 0 replies; 7+ messages in thread

From: Devrim Gündüz @ 2014-11-07 17:46 UTC (permalink / raw)
  To: Davenport, Julie <JDavenport@ctcd.edu>; +Cc: jayknowsunix@gmail.com <jayknowsunix@gmail.com>; Payal Singh <payal@omniti.com>; pgsql-admin


Hi,

On Tue, 2014-11-04 at 22:57 +0000, Davenport, Julie wrote:
> Thank you Jay and Payal, you were right, the wrong bin was in use:
> 
> # ll /usr/bin/psql
> -rwxr-xr-x 1 root root 342832 Aug 27  2012 /usr/bin/psql
> (8.4 binary)
> 
> 
> # ll /usr/pgsql-9.2/bin/psql
> -rwxr-xr-x 1 root root 439352 Jul 22 11:25 /usr/pgsql-9.2/bin/psql
> (9.2 binary)
> 
> # which psql
> /usr/bin/psql
> 
> 8.4 was being used

I haven't tested recently, but if you remove 8.4 RPMs, I think you will
need to run

yum reinstall postgresql92 postgresql92-server

to rebuild the alternatives link (or extract them from the RPMs)

Regards,

-- 
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR

Attachments:

  signature.asc (application/pgp-signature, 818B) download

^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2014-11-07 17:46 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-11-03 22:32 WARNING: psql version 8.4, server version 9.2. Davenport, Julie <JDavenport@ctcd.edu>
2014-11-03 22:38 ` Payal Singh <payal@omniti.com>
2014-11-03 23:55   ` jayknowsunix@gmail.com
2014-11-04 22:57     ` Davenport, Julie <JDavenport@ctcd.edu>
2014-11-07 17:46       ` Devrim Gündüz <devrim@gunduz.org>
2014-11-04 04:36 ` Shreeyansh dba <shreeyansh2014@gmail.com>
2014-11-04 23:09   ` Davenport, Julie <JDavenport@ctcd.edu>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox