From: | Mike Dewhirst <miked(at)dewhirst(dot)com(dot)au> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Switching from 9.1 to 9.5 on Ubuntu 16.04 |
Date: | 2018-08-22 01:56:20 |
Message-ID: | 809c43ff-a3c3-b270-adaf-a03bf76c6b39@dewhirst.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On 21/08/2018 10:58 PM, pavan95 wrote:
> Mike,
>
>> createdb --port=5432 --host=pq4 --template=template0 --encoding=UTF8
> --lc-collate=C --lc-ctype=C --username=miked --owner=miked train
>
> Is the dbname specified
Yes - train is the dbname
>
>> mike(at)pq4:~$
>> mike(at)pq4:~$ sudo -u postgres /usr/lib/postgresql/9.1/bin/pg_ctl -D
> "/var/lib/postgresql/9.1/main" status
> could not change directory to "/home/mike"
>> pg_ctl: server is running (PID: 4993)
>> /usr/lib/postgresql/9.1/bin/postgres "-D" "/var/lib/postgresql/9.1/main"
> "-c" "config_file=/etc/postgresql/9.1/main/postgresql.conf"
>
> Why is Postgres 9.1 is in running state? Your requirement is to disable 9.1
> & enable 9.5 right??
>
> And if could you provide me on the below info?
>
> 1) Is the backup for the required database taken from the instance 9.1 and
> stored in the same server?
>
> 2) If yes then stop 9.1 server and make sure only postgres 9.5 is in active
> state(you can do this as "su postgres" user)
>
> 3) Ensure the active listening postgres ports on the server by:
> netstat -alp | grep "5432"
>
> 4) Later as same "su postgres user" provide the connection string like
> below:
> /usr/lib/postgresql/9.5/bin/psql -d postgres -U miked -p
> 5432
>
> 5) Now issue select version()(It should be Postgres 9.5)
>
> 6) If Postgres 9.5 issue create database dbname
>
> 7) Restore the taken backup into the newly created database.
>
> I think this should suffice. Any misinterpretations on my side could be
> corrected.
>
>
> Regards,
> Pavan
>
>
>
> --
> Sent from: http://www.postgresql-archive.org/PostgreSQL-novice-f2132464.html
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | pavan95 | 2018-08-22 04:52:11 | Re: Switching from 9.1 to 9.5 on Ubuntu 16.04 |
Previous Message | pavan95 | 2018-08-21 12:58:18 | Re: Switching from 9.1 to 9.5 on Ubuntu 16.04 |