Re: Switching from 9.1 to 9.5 on Ubuntu 16.04
Mike Dewhirst <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.novice |
|---|---|
| Message-ID | <[email protected]> |
On 21/08/2018 7:54 PM, pavan95 wrote: > Hi Mike, > > Are both Postgresql instances 9.5 and 9.1 are on same server?? > >>> When trying to createdb I'm getting the following error ... > What is the exact statement you have specified did you explicitly specified > any port?? createdb --port=5432 --host=pq4 --template=template0 --encoding=UTF8 --lc-collate=C --lc-ctype=C --username=miked --owner=miked train (pq4 is in my hosts file) > > My quick questions: > > 1) What does "sudo service postgresql status" give as root user? mike@pq4:~$ sudo service postgresql status [sudo] password for mike: ● postgresql.service - PostgreSQL RDBMS Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled) Active: active (exited) since Tue 2018-08-21 15:53:16 AEST; 4h 57min ago Process: 5041 ExecStart=/bin/true (code=exited, status=0/SUCCESS) Main PID: 5041 (code=exited, status=0/SUCCESS) CGroup: /system.slice/postgresql.service Aug 21 15:53:16 pq4 systemd[1]: Starting PostgreSQL RDBMS... Aug 21 15:53:16 pq4 systemd[1]: Started PostgreSQL RDBMS. mike@pq4:~$ > > 2) Login as /su postgres/ and try finding the status of both 9.1 and 9.5 > individually as shown below and paste the output: > > /usr/lib/postgresql/9.5/bin/pg_ctl -D "/var/lib/postgresql/9.5/main" status mike@pq4:~$ sudo -u postgres /usr/lib/postgresql/9.5/bin/pg_ctl -D "/var/lib/postgresql/9.5/main" status could not change directory to "/home/mike": Permission denied pg_ctl: server is running (PID: 4992) /usr/lib/postgresql/9.5/bin/postgres "-D" "/var/lib/postgresql/9.5/main" "-c" "config_file=/etc/postgresql/9.5/main/postgresql.conf" mike@pq4:~$ > /usr/lib/postgresql/9.1/bin/pg_ctl -D "/var/lib/postgresql/9.1/main" status mike@pq4:~$ mike@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" mike@pq4:~$ > > > It will help us to know which port is active postgres referring to? Pavan You may not have seen my recent response to Fabio's advice but the switch has been more or less successful except for a couple of bits and pieces I don't understand. Not sure how to deal with them but I have just lost *all* keyboard privileges for the evening :( Cheers Mike > > > Regards, > Pavan. > > > > -- > Sent from: http://www.postgresql-archive.org/PostgreSQL-novice-f2132464.html > >