Обсуждение: Postgres 10.7 Systemd Startup Issue

Поиск
Список
Период
Сортировка

Postgres 10.7 Systemd Startup Issue

От
"Kelly, Kevin"
Дата:

Hello,

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.

 

We’re running on top of a stock SLES12 SP3. Could someone assist in tracking down why this service isn’t transitioning to the active state?

 

Thanks,

Kevin Kelly

 




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.

Re: Postgres 10.7 Systemd Startup Issue

От
Francisco Olarte
Дата:
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
theprompt 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. Forking means the usual server approach,
server detachs and after ExecStart returns it is considered running.
Simple is for not detaching.

Your symptom seem to be caused by either using a execstart command
which does not detach ( so forking waits forever for initialisation to
finish ) or for not having done daemon-reload to systemd ( so you are
still in notify mode and it is waiting forever for postgres to tell
him it is ready ).

> We’re running on top of a stock SLES12 SP3. Could someone assist in tracking down why this service isn’t
transitioningto the active state? 

Try posting some log, the service file ( to know which command you use
), maybe a ps trace, but I would go for checking the two problems
above first. My bet is on the second one ( and if it is that you'll
have the surprise of it working after machine reboot ).

Bear in mind many of us, althoguh wanting to help,  do not even know
what "stock SLES12 SP3" is, so no idea on systemd version and/or
service files content.

Francisco Olarte.



RE: Postgres 10.7 Systemd Startup Issue

От
"Kelly, Kevin"
Дата:
Thanks for reaching out Francisco.  Here's some relevant information related to your questions.

Here's the service we're running (removed superfluous stuff like comments):

[Unit]
Description=PostgreSQL 10 database server
Documentation=https://www.postgresql.org/docs/10/static/
After=syslog.target
After=network.target

[Service]
Type=forking
User=postgresdbad
Group=postgresdba
Environment=PGDATA=/hostname/pg/pgdba1dbal/data
OOMScoreAdjust=-1000
Environment=PG_OOM_ADJUST_FILE=/proc/self/oom_score_adj
Environment=PG_OOM_ADJUST_VALUE=0
ExecStart=/hostname/pg/PostgreSQL-10.7/bin/postgres -D ${PGDATA}
ExecReload=/bin/kill -HUP $MAINPID
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=0

[Install]
WantedBy=multi-user.target



Here's the actual status:

● postgres.service - PostgreSQL 10 database server
   Loaded: loaded (/etc/systemd/system/postgres.service; enabled; vendor preset: disabled)
   Active: activating (start) since Thu 2019-06-06 14:00:39 EDT; 23s ago
     Docs: https://www.postgresql.org/docs/10/static/
 Main PID: 4094 (code=exited, status=2);         : 4382 (postgres)
    Tasks: 9
   CGroup: /system.slice/postgres.service
           ├─4382 /hostname/pg/PostgreSQL-10.7/bin/postgres -D /hostname/pg/postgres/data
           ├─4385 postgres: logger process
           ├─4387 postgres: checkpointer process
           ├─4388 postgres: writer process
           ├─4389 postgres: wal writer process
           ├─4390 postgres: autovacuum launcher process
           ├─4391 postgres: archiver process
           ├─4392 postgres: stats collector process
           └─4393 postgres: bgworker: logical replication launcher

Jun 06 14:00:39 pgdbadevbal800 systemd[1]: Starting PostgreSQL 10 database server...
Jun 06 14:00:39 pgdbadevbal800 postgres[4382]: 2019-06-06 14:00:39.692 EDT [4382] LOG:  listening on IPv4 address
"##.###.###.###",port 5432
 
Jun 06 14:00:39 pgdbadevbal800 postgres[4382]: 2019-06-06 14:00:39.696 EDT [4382] LOG:  listening on Unix socket
"/tmp/.s.PGSQL.5432"
Jun 06 14:00:39 pgdbadevbal800 postgres[4382]: 2019-06-06 14:00:39.704 EDT [4382] LOG:  redirecting log output to
loggingcollector process
 
Jun 06 14:00:39 pgdbadevbal800 postgres[4382]: 2019-06-06 14:00:39.704 EDT [4382] HINT:  Future log output will appear
indirectory "/hostname/pg/postgres/log".
 


It appears to fork successfully however the state still shows as "activating" and remains like that. We have another
boxin our environment, same OS but is running postgres 10.3-1PGDG.sles12 official package. The 10.7 in the example
aboveis from a tarball. Both hosts are using near identical systemd service files. The other box will start up and
reachan "Active (running)" state.
 

Other related information:
 - systemd version 228-150.29.1 (on both hosts)
 - os SUSE Linux Enterprise Server 12 SP3 (on both)
 - I do run a systemctl daemon-reload after any changes to service files.

Thank you again for reaching out!

-Kevin Kelly

-----Original Message-----
From: Francisco Olarte [mailto:folarte@peoplecall.com]
Sent: Thursday, June 06, 2019 1:44 PM
To: Kelly, Kevin <Kevin.Kelly@msx.bala.susq.com>
Cc: 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 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
theprompt 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
justfine, 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
wholeservice file ).
 

The type tells systemd how to know the service has finished starting and is running, notify means it does systemd
integrationvia socket, with IIRC postgres does not. Forking means the usual server approach, server detachs and after
ExecStartreturns it is considered running.
 
Simple is for not detaching.

Your symptom seem to be caused by either using a execstart command which does not detach ( so forking waits forever for
initialisationto finish ) or for not having done daemon-reload to systemd ( so you are still in notify mode and it is
waitingforever for postgres to tell him it is ready ).
 

> We’re running on top of a stock SLES12 SP3. Could someone assist in tracking down why this service isn’t
transitioningto the active state?
 

Try posting some log, the service file ( to know which command you use ), maybe a ps trace, but I would go for checking
thetwo problems above first. My be t is on the second one ( and if it is that you'll have the surprise of it working
aftermachine reboot ).
 

Bear in mind many of us, althoguh wanting to help,  do not even know what "stock SLES12 SP3" is, so no idea on systemd
versionand/or service files content.
 

Francisco Olarte.

________________________________

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.
Anyreview, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient
isstrictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer,
solicitationor recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her
employernor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the
informationcontained herein or that this message or any of its attachments is free of viruses.
 

Re: Postgres 10.7 Systemd Startup Issue

От
Tom Lane
Дата:
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
theprompt 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.

            regards, tom lane



Re: Postgres 10.7 Systemd Startup Issue

От
Christopher Browne
Дата:


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

Re: Postgres 10.7 Systemd Startup Issue

От
Francisco Olarte
Дата:
Tom:

On Fri, Jun 7, 2019 at 2:19 AM 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:

> > 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.

Upz, totally my fault. Oviously IDNRC.

maybe them he should check if the program HAS been built this way ( as
it's optional, from what I see ).

Francisco Olarte.



RE: Postgres 10.7 Systemd Startup Issue

От
"Lu, Dan"
Дата:

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.

RE: Postgres 10.7 Systemd Startup Issue

От
"Lu, Dan"
Дата:

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.

Re: Postgres 10.7 Systemd Startup Issue

От
Tom Lane
Дата:
"Lu, Dan" <Dan.Lu@sig.com> writes:
> Even with the added option “—with-systemd”, it is not working still.

Hmmm ....

> To outline what I did.

> 2)  Configure PostgreSQL to new location
> mkdir /hostname/pg/PostgreSQL-10.7_2
> ./configure --prefix=/hostname/pg/PostgreSQL-10.7_2

Is it just a copy-and-paste mistake that you don't actually have
a --with-systemd option here?

Also, it seems fairly unusual for anyone to build a production
installation with absolutely no configuration options --- it'd
work, but you'd get a really plain-vanilla server.  You might
consider reviewing

https://www.postgresql.org/docs/10/install-procedure.html

to see what other things might make sense to turn on.

            regards, tom lane



RE: Postgres 10.7 Systemd Startup Issue

От
"Lu, Dan"
Дата:
I apologize, it was a copy/paste error.  I did include the option "--with-systemd".

This is our first install of postgresql.  I am in the process of getting standard in place for future deployment.  We
don'thave any large footprint of postgresql here.  We run mostly Oracle, SQL Server and MySQL in production so far.
 

Dan

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Friday, June 07, 2019 10:04 AM
To: Lu, Dan <Dan.Lu@msx.bala.susq.com>
Cc: Christopher Browne <cbbrowne@gmail.com>; 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

"Lu, Dan" <Dan.Lu@sig.com> writes:
> Even with the added option “—with-systemd”, it is not working still.

Hmmm ....

> To outline what I did.

> 2)  Configure PostgreSQL to new location mkdir
> /hostname/pg/PostgreSQL-10.7_2 ./configure
> --prefix=/hostname/pg/PostgreSQL-10.7_2

Is it just a copy-and-paste mistake that you don't actually have a --with-systemd option here?

Also, it seems fairly unusual for anyone to build a production installation with absolutely no configuration options
---it'd work, but you'd get a really plain-vanilla server.  You might consider reviewing
 

https://www.postgresql.org/docs/10/install-procedure.html

to see what other things might make sense to turn on.

regards, tom lane

________________________________

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.
Anyreview, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient
isstrictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer,
solicitationor recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her
employernor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the
informationcontained herein or that this message or any of its attachments is free of viruses.
 

Re: Postgres 10.7 Systemd Startup Issue

От
Francisco Olarte
Дата:
Lu:

On Fri, Jun 7, 2019 at 3:48 PM Lu, Dan <Dan.Lu@sig.com> wrote:
> 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

I assume you also modified and reload the service file to match the
new configuration. ( type notify? )

Francisco Olarte.



RE: Postgres 10.7 Systemd Startup Issue

От
"Lu, Dan"
Дата:
Hello All,

I ended up removing all configuration.  Re-unzip the binary tar files we downloaded.  Re-configure with the option
"--with-systemd"and now it is working.
 

We really appreciate all your help!

Dan

-----Original Message-----
From: Lu, Dan
Sent: Friday, June 07, 2019 10:11 AM
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: Christopher Browne <cbbrowne@gmail.com>; 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

I apologize, it was a copy/paste error.  I did include the option "--with-systemd".

This is our first install of postgresql.  I am in the process of getting standard in place for future deployment.  We
don'thave any large footprint of postgresql here.  We run mostly Oracle, SQL Server and MySQL in production so far.
 

Dan

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Friday, June 07, 2019 10:04 AM
To: Lu, Dan <Dan.Lu@msx.bala.susq.com>
Cc: Christopher Browne <cbbrowne@gmail.com>; 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

"Lu, Dan" <Dan.Lu@sig.com> writes:
> Even with the added option “—with-systemd”, it is not working still.

Hmmm ....

> To outline what I did.

> 2)  Configure PostgreSQL to new location mkdir
> /hostname/pg/PostgreSQL-10.7_2 ./configure
> --prefix=/hostname/pg/PostgreSQL-10.7_2

Is it just a copy-and-paste mistake that you don't actually have a --with-systemd option here?

Also, it seems fairly unusual for anyone to build a production installation with absolutely no configuration options
---it'd work, but you'd get a really plain-vanilla server.  You might consider reviewing
 

https://www.postgresql.org/docs/10/install-procedure.html

to see what other things might make sense to turn on.

regards, tom lane

________________________________

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.
Anyreview, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient
isstrictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer,
solicitationor recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her
employernor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the
informationcontained herein or that this message or any of its attachments is free of viruses.
 

Re: Postgres 10.7 Systemd Startup Issue

От
"Peter J. Holzer"
Дата:
On 2019-06-07 12:45:36 +0000, Lu, Dan wrote:
> Thank you so much for pointing that out.
>
> I downloaded the binary from https://ftp.postgresql.org/pub/source/v10.7
                   ^^^^^^
                   source, obviously.
> 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'm curious why you build from source. There are packages available for
SLES 12 (see https://www.postgresql.org/download/linux/suse/). I would
expect those to include a working systemd configuration (assuming
systemd is the default init on SuSE).

        hp

--
   _  | Peter J. Holzer    | we build much bigger, better disasters now
|_|_) |                    | because we have much more sophisticated
| |   | hjp@hjp.at         | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>

Вложения

RE: Postgres 10.7 Systemd Startup Issue

От
"Lu, Dan"
Дата:
Greeting,

I have a follow-up question regarding PostgreSQL configure option.

Example:
./configure --prefix=/hostname/pg/PostgreSQL-11.5 --with-systemd --with-openssl

Above example I configure PG with 2 options:
1. with-systemd
2. with-openssl

Is there a catalog view that I can query to see what options were used to configure the PG instance?  We will be taking
overadministration of existing PG instance, but we would need to know what configuration option was used during build.
 

Your feedback and help is much appreciated.

Dan

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

Hello All,

I ended up removing all configuration.  Re-unzip the binary tar files we downloaded.  Re-configure with the option
"--with-systemd"and now it is working.
 

We really appreciate all your help!

Dan

-----Original Message-----
From: Lu, Dan
Sent: Friday, June 07, 2019 10:11 AM
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: Christopher Browne <cbbrowne@gmail.com>; 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

I apologize, it was a copy/paste error.  I did include the option "--with-systemd".

This is our first install of postgresql.  I am in the process of getting standard in place for future deployment.  We
don'thave any large footprint of postgresql here.  We run mostly Oracle, SQL Server and MySQL in production so far.
 

Dan

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Friday, June 07, 2019 10:04 AM
To: Lu, Dan <Dan.Lu@msx.bala.susq.com>
Cc: Christopher Browne <cbbrowne@gmail.com>; 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

"Lu, Dan" <Dan.Lu@sig.com> writes:
> Even with the added option “—with-systemd”, it is not working still.

Hmmm ....

> To outline what I did.

> 2)  Configure PostgreSQL to new location mkdir
> /hostname/pg/PostgreSQL-10.7_2 ./configure
> --prefix=/hostname/pg/PostgreSQL-10.7_2

Is it just a copy-and-paste mistake that you don't actually have a --with-systemd option here?

Also, it seems fairly unusual for anyone to build a production installation with absolutely no configuration options
---it'd work, but you'd get a really plain-vanilla server.  You might consider reviewing
 

https://www.postgresql.org/docs/10/install-procedure.html

to see what other things might make sense to turn on.

regards, tom lane

________________________________

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.
Anyreview, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient
isstrictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer,
solicitationor recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her
employernor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the
informationcontained herein or that this message or any of its attachments is free of viruses.
 

Re: Postgres 10.7 Systemd Startup Issue

От
Tom Lane
Дата:
"Lu, Dan" <Dan.Lu@sig.com> writes:
> Is there a catalog view that I can query to see what options were used
> to configure the PG instance?

No, but pg_config should tell you.

            regards, tom lane



RE: Postgres 10.7 Systemd Startup Issue

От
"Lu, Dan"
Дата:
Thank you so much for your help!



-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Monday, October 14, 2019 2:19 PM
To: Lu, Dan <Dan.Lu@sig.com>
Cc: Christopher Browne <cbbrowne@gmail.com>; Francisco Olarte <folarte@peoplecall.com>; pgsql-general@postgresql.org
Subject: Re: Postgres 10.7 Systemd Startup Issue

"Lu, Dan" <Dan.Lu@sig.com> writes:
> Is there a catalog view that I can query to see what options were used
> to configure the PG instance?

No, but pg_config should tell you.

regards, tom lane

________________________________

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.
Anyreview, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient
isstrictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer,
solicitationor recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her
employernor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the
informationcontained herein or that this message or any of its attachments is free of viruses.