Re: Postgresql 9.3 Server will not start after Ubuntu Upgrade - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Postgresql 9.3 Server will not start after Ubuntu Upgrade
Date
Msg-id 5da68044-3c4a-fda3-bb9b-85d8789792e1@aklaver.com
Whole thread Raw
In response to Re: Postgresql 9.3 Server will not start after Ubuntu Upgrade  (Ken Beck <nekkceb.durfee@gmail.com>)
Responses Re: Postgresql 9.3 Server will not start after Ubuntu Upgrade  (Ben Madin <ben@ausvet.com.au>)
List pgsql-general
On 03/28/2018 07:29 PM, Ken Beck wrote:

Comments in line.

> The current log is 0 length, and indeed empty.
> 
> I just tried 'sudo pg_ctlcluster 9.3 main start'  and got the following
> error:
> 
> Error: Config owner (kcb:1000) and data owner (postgres:116) do not
> match, and config owner is not root

So why is your config owned by you and the data owned by postgres?

Your configuration files should be under:

/etc/postgresql/9.3/main/

and on my Ubuntu setups anyway is owned by postgres.

> 
> Changed to user postgres, tried again and go >
> Warning: the cluster will not be running as a systemd service. Consider
> using systemctl:
>    sudo systemctl start postgresql@9.3-main
> Removed stale pid file.
> 
> Next tried the suggestion:
> 
> sudo systemctl start postgresql@9.3-main, but the system failed to
> accept the password for user postgres. That is NOT something I changed

My experience with Ubuntu is that the postgres system user does not have 
a password. So where you using the database postgres user password? For 
more detail see here:

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-16-04

> during the Ubuntu upgrade process, so that has been a puzzle as well. My
> main login, user kcb is OK, password still works.
> 
> So I change back to user kcb and try the suggestion again:
> 
> kcb: jobs(0)$ sudo systemctl start postgresql@9.3-main
> Job for postgresql@9.3-main.service failed because the control process
> exited with error code. See "systemctl status
> postgresql@9.3-main.service" and "journalctl -xe" for details.
> kcb: jobs(0)$ systemctl status postgresql@9.3-main.service
> ● postgresql@9.3-main.service - PostgreSQL Cluster 9.3-main
>     Loaded: loaded (/lib/systemd/system/postgresql@.service; disabled;
> vendor preset: enabled)
>     Active: failed (Result: exit-code) since Wed 2018-03-28 19:51:50 MDT;
> 47s ago
>    Process: 2960 ExecStart=postgresql@%i --skip-systemctl-redirect %i
> start (code=exited, status=
> 
> Mar 28 19:51:50 kcb-VirtualBox systemd[1]: Starting PostgreSQL Cluster
> 9.3-main...
> Mar 28 19:51:50 kcb-VirtualBox postgresql@9.3-main[2960]: Error: Config
> owner (kcb:1000) and dat

Again the error with the config owner being you. Seems it would help to 
track down what copies of the conf files are installed on your machine.


> Mar 28 19:51:50 kcb-VirtualBox systemd[1]: postgresql@9.3-main.service:
> Control process exited,
> Mar 28 19:51:50 kcb-VirtualBox systemd[1]: Failed to start PostgreSQL
> Cluster 9.3-main.
> Mar 28 19:51:50 kcb-VirtualBox systemd[1]: postgresql@9.3-main.service:
> Unit entered failed stat
> Mar 28 19:51:50 kcb-VirtualBox systemd[1]: postgresql@9.3-main.service:
> Failed with result 'exit
> 
> Is it possible a big problem is that the password for user postgres not
> longer works for some reason, not sure why. It appears the password can
> not be rest or changed without knowing the original, and what I thought
> was the original no longer works.

Remember there are two postgres users in play here, the system user and 
the database one. Which one are you referring to?




-- 
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Thiemo Kellner
Date:
Subject: Re: Autonomous transaction, background worker
Next
From: Cory Tucker
Date:
Subject: Bad Query Plans on 10.3 vs 9.6