pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedpg_ctl pointing postgres 9.5.4 after installation of postgres 10
5+ messages / 3 participants
[nested] [flat]
* pg_ctl pointing postgres 9.5.4 after installation of postgres 10
@ 2018-08-11 19:02 Debraj Manna <subharaj.manna@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Debraj Manna @ 2018-08-11 19:02 UTC (permalink / raw)
To: pgsql-admin
Hi
I have updated postgres from 9.5.4 to the latest 10.4.
But after installation I am seeing
support@platform1:/usr/bin$ ls -lah pg_ctl
lrwxrwxrwx 1 root root 34 Jun 13 08:59 pg_ctl ->
/usr/lib/postgresql/9.5/bin/pg_ctl
The issue appears similiar to the one discussed here
https://stackoverflow.com/a/24763074/785523.
To install postgres 10 I have followed the below steps:-
sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/
trusty-pgdg main"
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc |
sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-10
Then performed the data migration using pg_upgrade and then
removed postgres 9.5
Now posgres -V is also failing with the below error
support@platform1:/usr/bin$ postgres -V
The program 'postgres' is currently not installed. You can install it by
typing:
sudo apt-get install postgres-xc
Can someone let me know what is wrong and how can I fix it?
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pg_ctl pointing postgres 9.5.4 after installation of postgres 10
@ 2018-08-11 19:26 Debraj Manna <subharaj.manna@gmail.com>
parent: Debraj Manna <subharaj.manna@gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: Debraj Manna @ 2018-08-11 19:26 UTC (permalink / raw)
To: pgsql-admin
The same question I have asked in stackoverflow and dba.stackexchange, I
did not get any reply there also.
1.
https://dba.stackexchange.com/questions/214671/pg-ctl-still-pointing-to-9-5-4-after-upgrade-to-postg...
2.
https://stackoverflow.com/questions/51802990/pg-ctl-still-pointing-to-9-5-4-after-upgrade-to-postgre...
On Sun, Aug 12, 2018 at 12:32 AM, Debraj Manna <subharaj.manna@gmail.com>
wrote:
> Hi
>
> I have updated postgres from 9.5.4 to the latest 10.4.
>
> But after installation I am seeing
>
> support@platform1:/usr/bin$ ls -lah pg_ctl
> lrwxrwxrwx 1 root root 34 Jun 13 08:59 pg_ctl ->
> /usr/lib/postgresql/9.5/bin/pg_ctl
>
> The issue appears similiar to the one discussed here
> https://stackoverflow.com/a/24763074/785523.
>
> To install postgres 10 I have followed the below steps:-
>
> sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main"
>
> wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
>
> sudo apt-get update
>
> sudo apt-get install postgresql-10
>
> Then performed the data migration using pg_upgrade and then
> removed postgres 9.5
>
> Now posgres -V is also failing with the below error
>
> support@platform1:/usr/bin$ postgres -V
> The program 'postgres' is currently not installed. You can install it by
> typing:
> sudo apt-get install postgres-xc
>
> Can someone let me know what is wrong and how can I fix it?
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pg_ctl pointing postgres 9.5.4 after installation of postgres 10
@ 2018-08-12 03:45 Rajni Baliyan <saan654@gmail.com>
parent: Debraj Manna <subharaj.manna@gmail.com>
1 sibling, 1 reply; 5+ messages in thread
From: Rajni Baliyan @ 2018-08-12 03:45 UTC (permalink / raw)
To: Debraj Manna <subharaj.manna@gmail.com>; +Cc: pgsql-admin
Have you set the correct environment variables after upgrade?
Your environment variables are still pointing to older version.
Set PATH to PG 10 binaries and then retry.
Regards
Rajni
On Sun, 12 Aug 2018 at 5:27 am Debraj Manna <subharaj.manna@gmail.com>
wrote:
> The same question I have asked in stackoverflow and dba.stackexchange, I
> did not get any reply there also.
>
>
> 1.
> https://dba.stackexchange.com/questions/214671/pg-ctl-still-pointing-to-9-5-4-after-upgrade-to-postg...
> 2.
> https://stackoverflow.com/questions/51802990/pg-ctl-still-pointing-to-9-5-4-after-upgrade-to-postgre...
>
>
> On Sun, Aug 12, 2018 at 12:32 AM, Debraj Manna <subharaj.manna@gmail.com>
> wrote:
>
>> Hi
>>
>> I have updated postgres from 9.5.4 to the latest 10.4.
>>
>> But after installation I am seeing
>>
>> support@platform1:/usr/bin$ ls -lah pg_ctl
>> lrwxrwxrwx 1 root root 34 Jun 13 08:59 pg_ctl ->
>> /usr/lib/postgresql/9.5/bin/pg_ctl
>>
>> The issue appears similiar to the one discussed here
>> https://stackoverflow.com/a/24763074/785523.
>>
>> To install postgres 10 I have followed the below steps:-
>>
>> sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main"
>>
>> wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
>>
>> sudo apt-get update
>>
>> sudo apt-get install postgresql-10
>>
>> Then performed the data migration using pg_upgrade and then
>> removed postgres 9.5
>>
>> Now posgres -V is also failing with the below error
>>
>> support@platform1:/usr/bin$ postgres -V
>> The program 'postgres' is currently not installed. You can install it by
>> typing:
>> sudo apt-get install postgres-xc
>>
>> Can someone let me know what is wrong and how can I fix it?
>>
>
> --
Thanks
Regards,
Rajni
0410472086
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pg_ctl pointing postgres 9.5.4 after installation of postgres 10
@ 2018-08-12 04:39 Debraj Manna <subharaj.manna@gmail.com>
parent: Rajni Baliyan <saan654@gmail.com>
0 siblings, 0 replies; 5+ messages in thread
From: Debraj Manna @ 2018-08-12 04:39 UTC (permalink / raw)
To: Rajni Baliyan <saan654@gmail.com>; +Cc: pgsql-admin
Can you explain this a bit more? You meant to say I should add postgres
binary location in PATH variable after installation?
On Sun 12 Aug, 2018, 9:15 AM Rajni Baliyan, <saan654@gmail.com> wrote:
> Have you set the correct environment variables after upgrade?
> Your environment variables are still pointing to older version.
> Set PATH to PG 10 binaries and then retry.
>
> Regards
> Rajni
>
> On Sun, 12 Aug 2018 at 5:27 am Debraj Manna <subharaj.manna@gmail.com>
> wrote:
>
>> The same question I have asked in stackoverflow and dba.stackexchange, I
>> did not get any reply there also.
>>
>>
>> 1.
>> https://dba.stackexchange.com/questions/214671/pg-ctl-still-pointing-to-9-5-4-after-upgrade-to-postg...
>> 2.
>> https://stackoverflow.com/questions/51802990/pg-ctl-still-pointing-to-9-5-4-after-upgrade-to-postgre...
>>
>>
>> On Sun, Aug 12, 2018 at 12:32 AM, Debraj Manna <subharaj.manna@gmail.com>
>> wrote:
>>
>>> Hi
>>>
>>> I have updated postgres from 9.5.4 to the latest 10.4.
>>>
>>> But after installation I am seeing
>>>
>>> support@platform1:/usr/bin$ ls -lah pg_ctl
>>> lrwxrwxrwx 1 root root 34 Jun 13 08:59 pg_ctl ->
>>> /usr/lib/postgresql/9.5/bin/pg_ctl
>>>
>>> The issue appears similiar to the one discussed here
>>> https://stackoverflow.com/a/24763074/785523.
>>>
>>> To install postgres 10 I have followed the below steps:-
>>>
>>> sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main"
>>>
>>> wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
>>>
>>> sudo apt-get update
>>>
>>> sudo apt-get install postgresql-10
>>>
>>> Then performed the data migration using pg_upgrade and then
>>> removed postgres 9.5
>>>
>>> Now posgres -V is also failing with the below error
>>>
>>> support@platform1:/usr/bin$ postgres -V
>>> The program 'postgres' is currently not installed. You can install it by
>>> typing:
>>> sudo apt-get install postgres-xc
>>>
>>> Can someone let me know what is wrong and how can I fix it?
>>>
>>
>> --
> Thanks
> Regards,
> Rajni
> 0410472086
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pg_ctl pointing postgres 9.5.4 after installation of postgres 10
@ 2018-08-12 06:36 Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
parent: Debraj Manna <subharaj.manna@gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: Mark Kirkwood @ 2018-08-12 06:36 UTC (permalink / raw)
To: Debraj Manna <subharaj.manna@gmail.com>; pgsql-admin
What I suspect has happened is that:
- you have 10.4 installed
- you have 9.5 *client only* (as a result of upgrade or manual removal
of the server package)
Examine /usr/lib/postgresql/, you will probably see a 9.5 and 10
directory (but the 9.5 one probably won't have a postgres binary).
If you set PATH to have /usr/lib/postgresql/10/bin in front of
everything else then you will get you 10.4 binaries. However this is a
bit of a pain - I think you can make life simpler by using
'update-alternatives' to make postgres version 10 the default instead of
9.5 - or remove all the 9.5 packages (*but* if removing be careful that
you really don't have any 9.5 databases under /var/lib/postgresql/9.5
first...otherwise you will be reaching for your backups - at this point
I should ask you do have backups right)?
So perhaps do a bit more investigation, and report back here before
removing anything :-)
regards
Mark
On 12/08/18 07:26, Debraj Manna wrote:
> The same question I have asked in stackoverflow and dba.stackexchange,
> I did not get any reply there also.
>
> 1. https://dba.stackexchange.com/questions/214671/pg-ctl-still-pointing-to-9-5-4-after-upgrade-to-postg...
> 2. https://stackoverflow.com/questions/51802990/pg-ctl-still-pointing-to-9-5-4-after-upgrade-to-postgre...
>
>
> On Sun, Aug 12, 2018 at 12:32 AM, Debraj Manna
> <subharaj.manna@gmail.com <mailto:subharaj.manna@gmail.com>> wrote:
>
> Hi
>
> I have updated postgres from 9.5.4 to the latest 10.4.
>
> But after installation I am seeing
>
> support@platform1:/usr/bin$ ls -lah pg_ctl
> lrwxrwxrwx 1 root root 34 Jun 13 08:59 pg_ctl ->
> /usr/lib/postgresql/9.5/bin/pg_ctl
>
> The issue appears similiar to the one discussed here
> https://stackoverflow.com/a/24763074/785523
> <https://stackoverflow.com/a/24763074/785523;.
>
> To install postgres 10 I have followed the below steps:-
>
> |sudo add-apt-repository "deb
> http://apt.postgresql.org/pub/repos/apt/
> <http://apt.postgresql.org/pub/repos/apt/; trusty-pgdg main"|
>
> |wget --quiet -O -
> https://www.postgresql.org/media/keys/ACCC4CF8.asc
> <https://www.postgresql.org/media/keys/ACCC4CF8.asc; | sudo
> apt-key add -|
>
> |sudo apt-get update|
>
> |sudo apt-get install postgresql-10|
>
> Then performed the data migration using pg_upgrade and then
> removed postgres 9.5
>
> Now posgres -V is also failing with the below error
>
> support@platform1:/usr/bin$ postgres -V
> The program 'postgres' is currently not installed. You can install
> it by typing:
> sudo apt-get install postgres-xc
>
> Can someone let me know what is wrong and how can I fix it?
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2018-08-12 06:36 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-08-11 19:02 pg_ctl pointing postgres 9.5.4 after installation of postgres 10 Debraj Manna <subharaj.manna@gmail.com>
2018-08-11 19:26 ` Debraj Manna <subharaj.manna@gmail.com>
2018-08-12 03:45 ` Rajni Baliyan <saan654@gmail.com>
2018-08-12 04:39 ` Debraj Manna <subharaj.manna@gmail.com>
2018-08-12 06:36 ` Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
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