Re: server will not start (Debian)

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: stan <stanb(at)panix(dot)com>, Ray O'Donnell <ray(at)rodonnell(dot)ie>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: server will not start (Debian)
Date: 2019-12-10 17:03:44
Message-ID: ecc7bbf6-d38a-6488-0808-80a93df27d2e@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 12/10/19 8:24 AM, stan wrote:
>
> On Tue, Dec 10, 2019 at 04:13:02PM +0000, Ray O'Donnell wrote:
>> On 10/12/2019 16:11, Adrian Klaver wrote:
>>> On 12/10/19 7:32 AM, stan wrote:
>>>> On Tue, Dec 10, 2019 at 08:55:02AM -0500, Justin wrote:
>>>>> Hi Stan
>>>>>
>>>>> Check security make sure V12 postgres?? has the correct credentials....
>>>>>
>>>> OK,
>>>>
>>>> postgres(at)stantest:/var/run/postgresql$ ls -ld
>>>> drwxrwsr-x 2 postgres postgres 40 Dec 10 08:35 .
>>>>
>>>> Looks correct to me.
>>>>
>>>> This sundirectory 12-main.pg_stat_tmp keeps getting deleted.
>>>>
>>>> If I create it by hand as user psotgres, the DB starts up when I run:
>>>>
>>>> /usr/lib/postgresql/12/bin/postgres -D /var/lib/postgresql/12/main -c
>>>> config_file=/etc/postgresql/12/main/postgresql.conf
>>>>
>>>> But tring to start it with /etc/ini.d/postgresql start fails
>>>>
>>>
>>> How did you install Postgres 12?
>
> sudo apt-get install pointed at:
>
> deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main
>
>>>
>>> Why are you using the file in init.d/ instead of pg_ctlcluster?
>>
>> Or indeed systemctl? :-)
>
> I tried that also. did not remeber
>
> also:
>
> postgres(at)ica-db:~$ pg_ctlcluster 12 main start
> Warning: the cluster will not be running as a systemd service. Consider
> using systemctl:
> sudo systemctl start postgresql(at)12-main
> Cluster is already running.

You need to do the above as root:

aklaver(at)arkansas:~$ pg_lsclusters
Ver Cluster Port Status Owner Data directory Log file
11 main 5431 down postgres /var/lib/postgresql/11/main
/var/log/postgresql/postgresql-11-main.log
12 main 5432 online postgres /var/lib/postgresql/12/main
/var/log/postgresql/postgresql-12-main.log

aklaver(at)arkansas:~$ pg_ctlcluster 11 main start
Warning: the cluster will not be running as a systemd service. Consider
using systemctl:
sudo systemctl start postgresql(at)11-main
Error: You must run this program as the cluster owner (postgres) or root

aklaver(at)arkansas:~$ sudo pg_ctlcluster 11 main start
[sudo] password for aklaver:

aklaver(at)arkansas:~$ pg_lsclusters
Ver Cluster Port Status Owner Data directory Log file
11 main 5431 online postgres /var/lib/postgresql/11/main
/var/log/postgresql/postgresql-11-main.log
12 main 5432 online postgres /var/lib/postgresql/12/main
/var/log/postgresql/postgresql-12-main.log

Also the cluster is already running.
To confirm what you have running do:

ps ax | grep post

>
>>
>> Ray.
>>
>> --
>> Raymond O'Donnell // Galway // Ireland
>> ray(at)rodonnell(dot)ie
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2019-12-10 17:06:21 Re: server will not start (Debian)
Previous Message stan 2019-12-10 17:03:30 Re: server will not start (Debian)