Thank you so much for pointing that out.
I downloaded the binary from https://ftp.postgresql.org/pub/source/v10.7
After download, I did the following.
mkdir /hostname/pg/PostgreSQL-10.7_2
./configure --prefix=/hostname/pg/PostgreSQL-10.7_2
make
make install
I now included the option mentioned “./configure
--prefix=/hostname/pg/PostgreSQL-10.7_2 --with-systemd”. I also saw that in
the documentation now “Using Type=notify requires that the server binary was
built with configure --with-systemd.”.
We will reply back if we run into further issue.
Dan
From: Christopher Browne [mailto:[email protected]]
Sent: Thursday, June 06, 2019 9:19 PM
To: Tom Lane <[email protected]>
Cc: Francisco Olarte <[email protected]>; Kelly, Kevin
<[email protected]>; [email protected]; Lu, Dan
<[email protected]>
Subject: Re: Postgres 10.7 Systemd Startup Issue
On Thu, Jun 6, 2019, 8:19 PM Tom Lane
<[email protected]<mailto:[email protected]>> wrote:
Francisco Olarte <[email protected]<mailto:[email protected]>> writes:
> On Thu, Jun 6, 2019 at 6:57 PM Kelly, Kevin
> <[email protected]<mailto:[email protected]>> 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
________________________________
IMPORTANT: The information contained in this email and/or its attachments is
confidential. If you are not the intended recipient, please notify the sender
immediately by reply and immediately delete this message and all its
attachments. Any review, use, reproduction, disclosure or dissemination of this
message or any attachment by an unintended recipient is strictly prohibited.
Neither this message nor any attachment is intended as or should be construed
as an offer, solicitation or recommendation to buy or sell any security or
other financial instrument. Neither the sender, his or her employer nor any of
their respective affiliates makes any warranties as to the completeness or
accuracy of any of the information contained herein or that this message or any
of its attachments is free of viruses.