BUG #14288: sd_notify not called on startup using rhel RPMs
The following bug has been logged on the website:
Bug reference: 14288
Logged by: Boris Djurdjevic
Email address: boris.djurdjevic@postfinance.ch
PostgreSQL version: 9.6beta4
Operating system: RHEL 7.2
Description:
Hi there
We are using the following Version, installed from your YUM Repository:
Name : postgresql96-server
Arch : x86_64
Version : 9.6beta4
Release : 1PGDG.rhel7
Size : 18 M
On startup using "systemctl start postgresql-9.6" it comes to an timeout.
But this database instance is running and accepting connections (tested).
< 2016-08-15 10:54:28.040 CEST >LOG: database system was shut down at
2016-08-15 10:52:35 CEST
< 2016-08-15 10:54:28.043 CEST >LOG: MultiXact member wraparound
protections are now enabled
< 2016-08-15 10:54:28.046 CEST >LOG: database system is ready to accept
connections
< 2016-08-15 10:54:28.047 CEST >LOG: autovacuum launcher started
After "database system is ready to accept connections" there should be
sd_notify called, if I see it right. (see code at bottom)
It seams, that sd_notify is never called. The provided systemd.service is
using "Type=notify", which expects that sd_notify (or equivalent) is
called.
Aug 15 12:22:19 our-database-server systemd[1]: Starting PostgreSQL 9.6
database server...
Aug 15 12:22:19 our-database-server postmaster[7018]: < 2016-08-15
12:22:19.511 CEST >LOG: 00000: redirecting log output to logging collector
process
Aug 15 12:22:19 our-database-server postmaster[7018]: < 2016-08-15
12:22:19.511 CEST >HINT: Future log output will appear in directory
"pg_log".
Aug 15 12:22:19 our-database-server postmaster[7018]: < 2016-08-15
12:22:19.511 CEST >LOCATION: SysLogger_Start, syslogger.c:622
Aug 15 12:27:19 our-database-server systemd[1]: postgresql-9.6.service start
operation timed out. Terminating.
Aug 15 12:27:19 our-database-server systemd[1]: Failed to start PostgreSQL
9.6 database server.
Aug 15 12:27:19 our-database-server systemd[1]: Unit postgresql-9.6.service
entered failed state.
Aug 15 12:27:19 our-database-server systemd[1]: postgresql-9.6.service
failed.
Can it be, that systemd support is not compiled in:
djurdjevicb@our-database-server # strings /usr/pgsql-9.6/bin/postmaster |
grep "with-"
'--enable-rpath' '--prefix=/usr/pgsql-9.6'
'--includedir=/usr/pgsql-9.6/include' '--mandir=/usr/pgsql-9.6/share/man'
'--datadir=/usr/pgsql-9.6/share' '--enable-debug' '--enable-cassert'
'--with-perl' '--with-python' '--with-tcl' '--with-tclconfig=/usr/lib64'
'--with-openssl' '--with-pam' '--with-gssapi' '--with-includes=/usr/include'
'--with-libraries=/usr/lib64' '--enable-nls' '--enable-dtrace'
'--with-uuid=e2fs' '--with-libxml' '--with-libxslt' '--with-ldap'
'--with-selinux' '--with-system-tzdata=/usr/share/zoneinfo'
'--sysconfdir=/etc/sysconfig/pgsql' '--docdir=/usr/pgsql-9.6/doc'
'--htmldir=/usr/pgsql-9.6/doc/html' 'CFLAGS=-O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
-DLINUX_OOM_ADJ=0' 'LDFLAGS=-Wl,--as-needed'
djurdjevicb@our-database-server # ldd /usr/pgsql-9.6/bin/* | grep system
djurdjevicb@our-database-server #
Looking at the source rpms postgresql-9.6.spec file I cannot find a reason
why "systemd_enabled" isn't active.
The RPM has also Requires defined to systemd-units, which seams good.
Is there anyone also experiencing the same problem?
Am I doing something wrong?
Kind Regards
- Boris
src/backend/postmaster/postmaster.c
2805 /* at this point we are really open for
business */
2806 ereport(LOG,
2807 (errmsg("database system is ready to
accept connections")));
2808
2809 #ifdef USE_SYSTEMD
2810 sd_notify(0, "READY=1");
2811 #endif
2812
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Hi,
On Mon, 2016-08-15 at 10:55 +0000, boris.djurdjevic@postfinance.ch wrote:
Bug reference: 14288
Logged by: Boris Djurdjevic
Email address: boris.djurdjevic@postfinance.ch
PostgreSQL version: 9.6beta4
Operating system: RHEL 7.2
Description:Hi there
We are using the following Version, installed from your YUM Repository:
Name : postgresql96-server
Arch : x86_64
Version : 9.6beta4
Release : 1PGDG.rhel7
Size : 18 MOn startup using "systemctl start postgresql-9.6" it comes to an timeout.
But this database instance is running and accepting connections (tested).
This is fixed in 9.6beta4-2 RPMS, released on Friday. Can you please update and
test?
Regards,
--
Devrim GÜNDÜZ
EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR
This is fixed in 9.6beta4-2 RPMS, released on Friday. Can you please update and test?
Thanks for this fast response! I updated it last Thursday and didn't check today for updates.
Now it works as expected.
Kind regards
- Boris
Sicherheitshinweis:
Dieses E-Mail von PostFinance ist signiert. Weitere Informationen finden Sie unter:
https://www.postfinance.ch/e-signature.
Geben Sie Ihre Sicherheitselemente niemals Dritten bekannt.
Attachments:
Import Notes
Resolved by subject fallback