RE: Postgres 10.7 Systemd Startup Issue

Поиск
Список
Период
Сортировка
От Lu, Dan
Тема RE: Postgres 10.7 Systemd Startup Issue
Дата
Msg-id d988e6ef234949f79de1c48a569263ec@msx.bala.susq.com
обсуждение исходный текст
Ответ на Postgres 10.7 Systemd Startup Issue  ("Kelly, Kevin" <Kevin.Kelly@sig.com>)
Ответы Re: Postgres 10.7 Systemd Startup Issue  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Postgres 10.7 Systemd Startup Issue  (Francisco Olarte <folarte@peoplecall.com>)
Список pgsql-general

Even with the added option “—with-systemd”, it is not working still.

 

Status remains “   Active: activating (start) since Fri 2019-06-07 09:40:06 EDT; 13s ago”.

 

To outline what I did.

1)  Stop PostgreSQL instance running with “/hostname/pg/PostgreSQL-10.7” configuration which was compiled without the “—with-systemd” option

 

2)  Configure PostgreSQL to new location

 

mkdir /hostname/pg/PostgreSQL-10.7_2

 

./configure --prefix=/hostname/pg/PostgreSQL-10.7_2

 

make

make install

 

 

mv /hostname/pg/PostgreSQL-10.7 /hostname/pg/PostgreSQL-10.7.OLD

 

mv /hostname/pg/PostgreSQL-10.7_2 /hostname/pg/PostgreSQL-10.7

 

3)  Start PostgreSQL instance

 

Any more suggestion?


Dan

 

From: Lu, Dan
Sent: Friday, June 07, 2019 8:46 AM
To: 'Christopher Browne' <cbbrowne@gmail.com>; Tom Lane <tgl@sss.pgh.pa.us>
Cc: Francisco Olarte <folarte@peoplecall.com>; Kelly, Kevin <Kevin.Kelly@msx.bala.susq.com>; pgsql-general@postgresql.org
Subject: RE: Postgres 10.7 Systemd Startup Issue

 

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:cbbrowne@gmail.com]
Sent: Thursday, June 06, 2019 9:19 PM
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Francisco Olarte <folarte@peoplecall.com>; Kelly, Kevin <Kevin.Kelly@msx.bala.susq.com>; pgsql-general@postgresql.org; Lu, Dan <Dan.Lu@msx.bala.susq.com>
Subject: Re: Postgres 10.7 Systemd Startup Issue

 

 

On Thu, Jun 6, 2019, 8:19 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Francisco Olarte <folarte@peoplecall.com> writes:
> On Thu, Jun 6, 2019 at 6:57 PM Kelly, Kevin <Kevin.Kelly@sig.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




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.

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Snowball Stemming Greek support not included in Release 12 beta
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Postgres 10.7 Systemd Startup Issue