From: | Christopher Browne <cbbrowne(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Francisco Olarte <folarte(at)peoplecall(dot)com>, "Kelly, Kevin" <Kevin(dot)Kelly(at)sig(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, "Lu, Dan" <Dan(dot)Lu(at)sig(dot)com> |
Subject: | Re: Postgres 10.7 Systemd Startup Issue |
Date: | 2019-06-07 01:18:58 |
Message-ID: | CAFNqd5UY+AYGEN9WPksPoozgEzrcUAzm1OdVMYpj_Td2WWyPdw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Jun 6, 2019, 8:19 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Francisco Olarte <folarte(at)peoplecall(dot)com> writes:
> > On Thu, Jun 6, 2019 at 6:57 PM Kelly, Kevin <Kevin(dot)Kelly(at)sig(dot)com> wrote:
> >> We’re attempting to launch postgres via systemd and noticing that when
> invoking via systemctl start postgres.service the prompt never returns. If
> we switch to another tty and check the status it shows as:
> >> Active: activating (start) since Thu 2019-06-06 09:36:32 EDT; 12min ago
> >> If we change the type from notify to forking we see the same behavior.
> The instance seems to be up and running just fine, we just never see the
> active (running) status as we have come to expect.
>
> > Are you sure you have the postgres.service correctly configured? ( or
> > you could post the ExecStart/Type config, or the whole service file ).
>
> > The type tells systemd how to know the service has finished starting
> > and is running, notify means it does systemd integration via socket,
> > with IIRC postgres does not.
>
> I might be confusing this with some other issue, but I think PG does
> support systemd notification if you build it with the --with-systemd
> configuration option. This is recommended if you're using systemd
> to launch PG, because systemd's other options for figuring out the
> service state work substantially less well.
Yeah, I was one of the reviewers of the patch for this feature.
If the configuration parameter is turned on then Postgres reports in to
SystemD once it completes any crash recovery work to indicate that the
database service is up.
That way, if there was a bunch of WAL needing to be processed, services
depending on Postgres will properly get deferred.
You need to set up the service type in the SystemD service file to
Type=notify
in order to get this behavior
From | Date | Subject | |
---|---|---|---|
Next Message | Tasos | 2019-06-07 08:31:08 | Snowball Stemming Greek support not included in Release 12 beta |
Previous Message | Tom Lane | 2019-06-07 00:19:08 | Re: Postgres 10.7 Systemd Startup Issue |