public inbox for [email protected]  
help / color / mirror / Atom feed
From: Martín Marqués <[email protected]>
To: Jeff Frost <[email protected]>
Cc: Justin King <[email protected]>
Cc: [email protected]
Subject: Re: repmgr.service
Date: Wed, 30 Dec 2015 17:40:52 -0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CAL3i3zT1NXVTyO=jOSXTnj3Uch9T569-LMyehDrUYqn0X+g2=w@mail.gmail.com>
	<[email protected]>
	<[email protected]>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-pkg-yum>

El 22/12/15 a las 23:52, Jeff Frost escribió:
> Sorry for the slow reply on this.
> 
> We did make some changes recently, but it seems this was not one of them.
> 
> A patch would definitely speed us up and would be most welcome!

Promised patch. Let me know if there's something to fix.

Regards,

-- 
Martín Marqués                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-pkg-yum mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-yum


Attachments:

  [text/x-patch] 0001-fix-BUG-related-with-systemd-not-killing-repmgrd.patch (30.2K, 2-0001-fix-BUG-related-with-systemd-not-killing-repmgrd.patch)
  download | inline diff:
From a5eeaf156cdf1224dd50058238665b0177af0293 Mon Sep 17 00:00:00 2001
From: Martin <[email protected]>
Date: Wed, 30 Dec 2015 17:25:28 -0300
Subject: [PATCH] fix BUG related with systemd not killing repmgrd

---
 rpm/redhat/9.1/repmgr/EL-5/repmgr-9.1.service | 11 ++++++-----
 rpm/redhat/9.1/repmgr/EL-6/repmgr-9.1.service | 11 ++++++-----
 rpm/redhat/9.2/repmgr/EL-5/repmgr-9.2.service | 13 ++++++++-----
 rpm/redhat/9.2/repmgr/EL-6/repmgr-9.2.service | 11 ++++++-----
 rpm/redhat/9.2/repmgr/EL-7/repmgr-9.2.service | 11 ++++++-----
 rpm/redhat/9.2/repmgr/F-19/repmgr-9.2.service | 11 ++++++-----
 rpm/redhat/9.3/repmgr/EL-5/repmgr-9.3.service | 13 ++++++++-----
 rpm/redhat/9.3/repmgr/EL-6/repmgr-9.3.service | 11 +++++++----
 rpm/redhat/9.3/repmgr/EL-7/repmgr-9.3.service | 11 +++++++----
 rpm/redhat/9.3/repmgr/F-20/repmgr-9.3.service | 11 +++++++----
 rpm/redhat/9.3/repmgr/F-21/repmgr-9.3.service | 11 +++++++----
 rpm/redhat/9.3/repmgr/F-22/repmgr-9.3.service | 11 +++++++----
 rpm/redhat/9.3/repmgr/F-23/repmgr-9.3.service | 13 ++++++++-----
 rpm/redhat/9.4/repmgr/EL-5/repmgr-9.4.service | 11 +++++++----
 rpm/redhat/9.4/repmgr/EL-6/repmgr-9.4.service | 11 +++++++----
 rpm/redhat/9.4/repmgr/EL-7/repmgr-9.4.service | 11 +++++++----
 rpm/redhat/9.4/repmgr/F-20/repmgr-9.4.service | 11 +++++++----
 rpm/redhat/9.4/repmgr/F-21/repmgr-9.4.service | 11 +++++++----
 rpm/redhat/9.4/repmgr/F-22/repmgr-9.4.service | 11 +++++++----
 rpm/redhat/9.4/repmgr/F-23/repmgr-9.4.service | 11 +++++++----
 rpm/redhat/9.5/repmgr/EL-5/repmgr-9.5.service |  7 ++++---
 rpm/redhat/9.5/repmgr/EL-6/repmgr-9.5.service |  7 ++++---
 rpm/redhat/9.5/repmgr/EL-7/repmgr-9.5.service |  7 ++++---
 rpm/redhat/9.5/repmgr/F-20/repmgr-9.5.service |  7 ++++---
 rpm/redhat/9.5/repmgr/F-21/repmgr-9.5.service |  7 ++++---
 rpm/redhat/9.5/repmgr/F-22/repmgr-9.5.service |  7 ++++---
 rpm/redhat/9.5/repmgr/F-23/repmgr-9.5.service |  7 ++++---
 27 files changed, 166 insertions(+), 109 deletions(-)

diff --git a/rpm/redhat/9.1/repmgr/EL-5/repmgr-9.1.service b/rpm/redhat/9.1/repmgr/EL-5/repmgr-9.1.service
index 5a3d584..799696c 100644
--- a/rpm/redhat/9.1/repmgr/EL-5/repmgr-9.1.service
+++ b/rpm/redhat/9.1/repmgr/EL-5/repmgr-9.1.service
@@ -15,8 +15,9 @@ After=network.target
 [Service]
 Type=forking
 
-User=repmgr
-Group=repmgr
+PIDFile=/var/run/repmgr/repmgrd-9.1.pid
+User=postgres
+Group=postgres
 
 # Location of repmgr conf file:
 Environment=REPMGRDCONF=/etc/repmgr/9.1/repmgr.conf
@@ -26,9 +27,9 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.1.log
 # Where to send early-startup messages from the server 
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
-ExecStart=/usr/pgsql-9.1/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d > ${REPMGRDLOG} 2>&1" 
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStart=/usr/pgsql-9.1/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d >> ${REPMGRDLOG} 2>&1" 
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.1/repmgr/EL-6/repmgr-9.1.service b/rpm/redhat/9.1/repmgr/EL-6/repmgr-9.1.service
index 1d545b4..d6208c0 100644
--- a/rpm/redhat/9.1/repmgr/EL-6/repmgr-9.1.service
+++ b/rpm/redhat/9.1/repmgr/EL-6/repmgr-9.1.service
@@ -15,8 +15,9 @@ After=network.target
 [Service]
 Type=forking
 
-User=repmgr
-Group=repmgr
+PIDFile=/var/run/repmgr/repmgrd-9.1.pid
+User=postgres
+Group=postgres
 
 # Location of repmgr conf file:
 Environment=REPMGRDCONF=/etc/repmgr/9.1/repmgr.conf
@@ -26,9 +27,9 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.1.log
 # Where to send early-startup messages from the server 
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
-ExecStart=/usr/pgsql-9.1/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d ->> ${REPMGRDLOG} 2>&1
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStart=/usr/pgsql-9.1/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d >> ${REPMGRDLOG} 2>&1
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.2/repmgr/EL-5/repmgr-9.2.service b/rpm/redhat/9.2/repmgr/EL-5/repmgr-9.2.service
index a54ee8d..e8fbe1e 100644
--- a/rpm/redhat/9.2/repmgr/EL-5/repmgr-9.2.service
+++ b/rpm/redhat/9.2/repmgr/EL-5/repmgr-9.2.service
@@ -15,8 +15,11 @@ After=network.target
 [Service]
 Type=forking
 
-User=repmgr
-Group=repmgr
+# PID file
+PIDFile=/var/run/repmgr/repmgrd-9.2.pid
+
+User=postgres
+Group=postgres
 
 # Location of repmgr conf file:
 Environment=REPMGRDCONF=/etc/repmgr/9.2/repmgr.conf
@@ -26,9 +29,9 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.2.log
 # Where to send early-startup messages from the server 
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
-ExecStart=/usr/pgsql-9.2/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d > ${REPMGRDLOG} 2>&1
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStart=/usr/pgsql-9.2/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d >> ${REPMGRDLOG} 2>&1
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.2/repmgr/EL-6/repmgr-9.2.service b/rpm/redhat/9.2/repmgr/EL-6/repmgr-9.2.service
index ef1aeed..d5f3afc 100644
--- a/rpm/redhat/9.2/repmgr/EL-6/repmgr-9.2.service
+++ b/rpm/redhat/9.2/repmgr/EL-6/repmgr-9.2.service
@@ -15,8 +15,9 @@ After=network.target
 [Service]
 Type=forking
 
-User=repmgr
-Group=repmgr
+PIDFile=/var/run/repmgr/repmgrd-9.2.pid
+User=postgres
+Group=postgres
 
 # Location of repmgr conf file:
 Environment=REPMGRDCONF=/etc/repmgr/9.2/repmgr.conf
@@ -26,9 +27,9 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.2.log
 # Where to send early-startup messages from the server 
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
-ExecStart=/usr/pgsql-9.2/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d ->> ${REPMGRDLOG} 2>&1
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStart=/usr/pgsql-9.2/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d >> ${REPMGRDLOG} 2>&1
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.2/repmgr/EL-7/repmgr-9.2.service b/rpm/redhat/9.2/repmgr/EL-7/repmgr-9.2.service
index ef1aeed..d5f3afc 100644
--- a/rpm/redhat/9.2/repmgr/EL-7/repmgr-9.2.service
+++ b/rpm/redhat/9.2/repmgr/EL-7/repmgr-9.2.service
@@ -15,8 +15,9 @@ After=network.target
 [Service]
 Type=forking
 
-User=repmgr
-Group=repmgr
+PIDFile=/var/run/repmgr/repmgrd-9.2.pid
+User=postgres
+Group=postgres
 
 # Location of repmgr conf file:
 Environment=REPMGRDCONF=/etc/repmgr/9.2/repmgr.conf
@@ -26,9 +27,9 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.2.log
 # Where to send early-startup messages from the server 
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
-ExecStart=/usr/pgsql-9.2/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d ->> ${REPMGRDLOG} 2>&1
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStart=/usr/pgsql-9.2/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d >> ${REPMGRDLOG} 2>&1
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.2/repmgr/F-19/repmgr-9.2.service b/rpm/redhat/9.2/repmgr/F-19/repmgr-9.2.service
index ef1aeed..d5f3afc 100644
--- a/rpm/redhat/9.2/repmgr/F-19/repmgr-9.2.service
+++ b/rpm/redhat/9.2/repmgr/F-19/repmgr-9.2.service
@@ -15,8 +15,9 @@ After=network.target
 [Service]
 Type=forking
 
-User=repmgr
-Group=repmgr
+PIDFile=/var/run/repmgr/repmgrd-9.2.pid
+User=postgres
+Group=postgres
 
 # Location of repmgr conf file:
 Environment=REPMGRDCONF=/etc/repmgr/9.2/repmgr.conf
@@ -26,9 +27,9 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.2.log
 # Where to send early-startup messages from the server 
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
-ExecStart=/usr/pgsql-9.2/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d ->> ${REPMGRDLOG} 2>&1
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStart=/usr/pgsql-9.2/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d >> ${REPMGRDLOG} 2>&1
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.3/repmgr/EL-5/repmgr-9.3.service b/rpm/redhat/9.3/repmgr/EL-5/repmgr-9.3.service
index 21bf5fc..ca29145 100644
--- a/rpm/redhat/9.3/repmgr/EL-5/repmgr-9.3.service
+++ b/rpm/redhat/9.3/repmgr/EL-5/repmgr-9.3.service
@@ -15,8 +15,11 @@ After=network.target
 [Service]
 Type=forking
 
-User=repmgr
-Group=repmgr
+# PID file
+PIDFile=/var/run/repmgr/repmgrd-9.3.pid
+
+User=postgres
+Group=postgres
 
 # Location of repmgr conf file:
 Environment=REPMGRDCONF=/etc/repmgr/9.3/repmgr.conf
@@ -26,9 +29,9 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.3.log
 # Where to send early-startup messages from the server 
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
-ExecStart=/usr/pgsql-9.3/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d > ${REPMGRDLOG} 2>&1
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStart=/usr/pgsql-9.3/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d >> ${REPMGRDLOG} 2>&1
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.3/repmgr/EL-6/repmgr-9.3.service b/rpm/redhat/9.3/repmgr/EL-6/repmgr-9.3.service
index 8d6bb36..9cc1a31 100644
--- a/rpm/redhat/9.3/repmgr/EL-6/repmgr-9.3.service
+++ b/rpm/redhat/9.3/repmgr/EL-6/repmgr-9.3.service
@@ -15,8 +15,11 @@ After=network.target
 [Service]
 Type=forking
 
-User=repmgr
-Group=repmgr
+# PID file
+PIDFile=/var/run/repmgr/repmgrd-9.3.pid
+
+User=postgres
+Group=postgres
 
 # Location of repmgr conf file:
 Environment=REPMGRDCONF=/etc/repmgr/9.3/repmgr.conf
@@ -27,8 +30,8 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.3.log
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
 ExecStart=/usr/pgsql-9.3/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d ->> ${REPMGRDLOG} 2>&1
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.3/repmgr/EL-7/repmgr-9.3.service b/rpm/redhat/9.3/repmgr/EL-7/repmgr-9.3.service
index 8d6bb36..9cc1a31 100644
--- a/rpm/redhat/9.3/repmgr/EL-7/repmgr-9.3.service
+++ b/rpm/redhat/9.3/repmgr/EL-7/repmgr-9.3.service
@@ -15,8 +15,11 @@ After=network.target
 [Service]
 Type=forking
 
-User=repmgr
-Group=repmgr
+# PID file
+PIDFile=/var/run/repmgr/repmgrd-9.3.pid
+
+User=postgres
+Group=postgres
 
 # Location of repmgr conf file:
 Environment=REPMGRDCONF=/etc/repmgr/9.3/repmgr.conf
@@ -27,8 +30,8 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.3.log
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
 ExecStart=/usr/pgsql-9.3/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d ->> ${REPMGRDLOG} 2>&1
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.3/repmgr/F-20/repmgr-9.3.service b/rpm/redhat/9.3/repmgr/F-20/repmgr-9.3.service
index 8d6bb36..9cc1a31 100644
--- a/rpm/redhat/9.3/repmgr/F-20/repmgr-9.3.service
+++ b/rpm/redhat/9.3/repmgr/F-20/repmgr-9.3.service
@@ -15,8 +15,11 @@ After=network.target
 [Service]
 Type=forking
 
-User=repmgr
-Group=repmgr
+# PID file
+PIDFile=/var/run/repmgr/repmgrd-9.3.pid
+
+User=postgres
+Group=postgres
 
 # Location of repmgr conf file:
 Environment=REPMGRDCONF=/etc/repmgr/9.3/repmgr.conf
@@ -27,8 +30,8 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.3.log
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
 ExecStart=/usr/pgsql-9.3/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d ->> ${REPMGRDLOG} 2>&1
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.3/repmgr/F-21/repmgr-9.3.service b/rpm/redhat/9.3/repmgr/F-21/repmgr-9.3.service
index 8d6bb36..9cc1a31 100644
--- a/rpm/redhat/9.3/repmgr/F-21/repmgr-9.3.service
+++ b/rpm/redhat/9.3/repmgr/F-21/repmgr-9.3.service
@@ -15,8 +15,11 @@ After=network.target
 [Service]
 Type=forking
 
-User=repmgr
-Group=repmgr
+# PID file
+PIDFile=/var/run/repmgr/repmgrd-9.3.pid
+
+User=postgres
+Group=postgres
 
 # Location of repmgr conf file:
 Environment=REPMGRDCONF=/etc/repmgr/9.3/repmgr.conf
@@ -27,8 +30,8 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.3.log
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
 ExecStart=/usr/pgsql-9.3/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d ->> ${REPMGRDLOG} 2>&1
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.3/repmgr/F-22/repmgr-9.3.service b/rpm/redhat/9.3/repmgr/F-22/repmgr-9.3.service
index 8d6bb36..9cc1a31 100644
--- a/rpm/redhat/9.3/repmgr/F-22/repmgr-9.3.service
+++ b/rpm/redhat/9.3/repmgr/F-22/repmgr-9.3.service
@@ -15,8 +15,11 @@ After=network.target
 [Service]
 Type=forking
 
-User=repmgr
-Group=repmgr
+# PID file
+PIDFile=/var/run/repmgr/repmgrd-9.3.pid
+
+User=postgres
+Group=postgres
 
 # Location of repmgr conf file:
 Environment=REPMGRDCONF=/etc/repmgr/9.3/repmgr.conf
@@ -27,8 +30,8 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.3.log
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
 ExecStart=/usr/pgsql-9.3/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d ->> ${REPMGRDLOG} 2>&1
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.3/repmgr/F-23/repmgr-9.3.service b/rpm/redhat/9.3/repmgr/F-23/repmgr-9.3.service
index 8d6bb36..ca29145 100644
--- a/rpm/redhat/9.3/repmgr/F-23/repmgr-9.3.service
+++ b/rpm/redhat/9.3/repmgr/F-23/repmgr-9.3.service
@@ -15,8 +15,11 @@ After=network.target
 [Service]
 Type=forking
 
-User=repmgr
-Group=repmgr
+# PID file
+PIDFile=/var/run/repmgr/repmgrd-9.3.pid
+
+User=postgres
+Group=postgres
 
 # Location of repmgr conf file:
 Environment=REPMGRDCONF=/etc/repmgr/9.3/repmgr.conf
@@ -26,9 +29,9 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.3.log
 # Where to send early-startup messages from the server 
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
-ExecStart=/usr/pgsql-9.3/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d ->> ${REPMGRDLOG} 2>&1
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStart=/usr/pgsql-9.3/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d >> ${REPMGRDLOG} 2>&1
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.4/repmgr/EL-5/repmgr-9.4.service b/rpm/redhat/9.4/repmgr/EL-5/repmgr-9.4.service
index 0a38556..6dd7acb 100644
--- a/rpm/redhat/9.4/repmgr/EL-5/repmgr-9.4.service
+++ b/rpm/redhat/9.4/repmgr/EL-5/repmgr-9.4.service
@@ -15,8 +15,11 @@ After=network.target
 [Service]
 Type=forking
 
-User=repmgr
-Group=repmgr
+# PID file
+PIDFile=/var/run/repmgr/repmgrd-9.4.pid
+
+User=postgres
+Group=postgres
 
 # Location of repmgr conf file:
 Environment=REPMGRDCONF=/etc/repmgr/9.4/repmgr.conf
@@ -27,8 +30,8 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.4.log
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
 ExecStart=/usr/pgsql-9.4/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d > ${REPMGRDLOG} 2>&1" 
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.4/repmgr/EL-6/repmgr-9.4.service b/rpm/redhat/9.4/repmgr/EL-6/repmgr-9.4.service
index 0a38556..6dd7acb 100644
--- a/rpm/redhat/9.4/repmgr/EL-6/repmgr-9.4.service
+++ b/rpm/redhat/9.4/repmgr/EL-6/repmgr-9.4.service
@@ -15,8 +15,11 @@ After=network.target
 [Service]
 Type=forking
 
-User=repmgr
-Group=repmgr
+# PID file
+PIDFile=/var/run/repmgr/repmgrd-9.4.pid
+
+User=postgres
+Group=postgres
 
 # Location of repmgr conf file:
 Environment=REPMGRDCONF=/etc/repmgr/9.4/repmgr.conf
@@ -27,8 +30,8 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.4.log
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
 ExecStart=/usr/pgsql-9.4/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d > ${REPMGRDLOG} 2>&1" 
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.4/repmgr/EL-7/repmgr-9.4.service b/rpm/redhat/9.4/repmgr/EL-7/repmgr-9.4.service
index 0a38556..6dd7acb 100644
--- a/rpm/redhat/9.4/repmgr/EL-7/repmgr-9.4.service
+++ b/rpm/redhat/9.4/repmgr/EL-7/repmgr-9.4.service
@@ -15,8 +15,11 @@ After=network.target
 [Service]
 Type=forking
 
-User=repmgr
-Group=repmgr
+# PID file
+PIDFile=/var/run/repmgr/repmgrd-9.4.pid
+
+User=postgres
+Group=postgres
 
 # Location of repmgr conf file:
 Environment=REPMGRDCONF=/etc/repmgr/9.4/repmgr.conf
@@ -27,8 +30,8 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.4.log
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
 ExecStart=/usr/pgsql-9.4/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d > ${REPMGRDLOG} 2>&1" 
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.4/repmgr/F-20/repmgr-9.4.service b/rpm/redhat/9.4/repmgr/F-20/repmgr-9.4.service
index 0a38556..6dd7acb 100644
--- a/rpm/redhat/9.4/repmgr/F-20/repmgr-9.4.service
+++ b/rpm/redhat/9.4/repmgr/F-20/repmgr-9.4.service
@@ -15,8 +15,11 @@ After=network.target
 [Service]
 Type=forking
 
-User=repmgr
-Group=repmgr
+# PID file
+PIDFile=/var/run/repmgr/repmgrd-9.4.pid
+
+User=postgres
+Group=postgres
 
 # Location of repmgr conf file:
 Environment=REPMGRDCONF=/etc/repmgr/9.4/repmgr.conf
@@ -27,8 +30,8 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.4.log
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
 ExecStart=/usr/pgsql-9.4/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d > ${REPMGRDLOG} 2>&1" 
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.4/repmgr/F-21/repmgr-9.4.service b/rpm/redhat/9.4/repmgr/F-21/repmgr-9.4.service
index 0a38556..6dd7acb 100644
--- a/rpm/redhat/9.4/repmgr/F-21/repmgr-9.4.service
+++ b/rpm/redhat/9.4/repmgr/F-21/repmgr-9.4.service
@@ -15,8 +15,11 @@ After=network.target
 [Service]
 Type=forking
 
-User=repmgr
-Group=repmgr
+# PID file
+PIDFile=/var/run/repmgr/repmgrd-9.4.pid
+
+User=postgres
+Group=postgres
 
 # Location of repmgr conf file:
 Environment=REPMGRDCONF=/etc/repmgr/9.4/repmgr.conf
@@ -27,8 +30,8 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.4.log
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
 ExecStart=/usr/pgsql-9.4/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d > ${REPMGRDLOG} 2>&1" 
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.4/repmgr/F-22/repmgr-9.4.service b/rpm/redhat/9.4/repmgr/F-22/repmgr-9.4.service
index 0a38556..6dd7acb 100644
--- a/rpm/redhat/9.4/repmgr/F-22/repmgr-9.4.service
+++ b/rpm/redhat/9.4/repmgr/F-22/repmgr-9.4.service
@@ -15,8 +15,11 @@ After=network.target
 [Service]
 Type=forking
 
-User=repmgr
-Group=repmgr
+# PID file
+PIDFile=/var/run/repmgr/repmgrd-9.4.pid
+
+User=postgres
+Group=postgres
 
 # Location of repmgr conf file:
 Environment=REPMGRDCONF=/etc/repmgr/9.4/repmgr.conf
@@ -27,8 +30,8 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.4.log
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
 ExecStart=/usr/pgsql-9.4/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d > ${REPMGRDLOG} 2>&1" 
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.4/repmgr/F-23/repmgr-9.4.service b/rpm/redhat/9.4/repmgr/F-23/repmgr-9.4.service
index 0a38556..6dd7acb 100644
--- a/rpm/redhat/9.4/repmgr/F-23/repmgr-9.4.service
+++ b/rpm/redhat/9.4/repmgr/F-23/repmgr-9.4.service
@@ -15,8 +15,11 @@ After=network.target
 [Service]
 Type=forking
 
-User=repmgr
-Group=repmgr
+# PID file
+PIDFile=/var/run/repmgr/repmgrd-9.4.pid
+
+User=postgres
+Group=postgres
 
 # Location of repmgr conf file:
 Environment=REPMGRDCONF=/etc/repmgr/9.4/repmgr.conf
@@ -27,8 +30,8 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.4.log
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
 ExecStart=/usr/pgsql-9.4/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d > ${REPMGRDLOG} 2>&1" 
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.5/repmgr/EL-5/repmgr-9.5.service b/rpm/redhat/9.5/repmgr/EL-5/repmgr-9.5.service
index d1d050f..14106c6 100644
--- a/rpm/redhat/9.5/repmgr/EL-5/repmgr-9.5.service
+++ b/rpm/redhat/9.5/repmgr/EL-5/repmgr-9.5.service
@@ -15,6 +15,7 @@ After=network.target
 [Service]
 Type=forking
 
+PIDFile=/var/run/repmgr/repmgrd-9.5.pid
 User=postgres
 Group=postgres
 
@@ -26,9 +27,9 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.5.log
 # Where to send early-startup messages from the server 
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
-ExecStart=/usr/pgsql-9.5/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d > ${REPMGRDLOG} 2>&1
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStart=/usr/pgsql-9.5/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d >> ${REPMGRDLOG} 2>&1
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.5/repmgr/EL-6/repmgr-9.5.service b/rpm/redhat/9.5/repmgr/EL-6/repmgr-9.5.service
index d1d050f..14106c6 100644
--- a/rpm/redhat/9.5/repmgr/EL-6/repmgr-9.5.service
+++ b/rpm/redhat/9.5/repmgr/EL-6/repmgr-9.5.service
@@ -15,6 +15,7 @@ After=network.target
 [Service]
 Type=forking
 
+PIDFile=/var/run/repmgr/repmgrd-9.5.pid
 User=postgres
 Group=postgres
 
@@ -26,9 +27,9 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.5.log
 # Where to send early-startup messages from the server 
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
-ExecStart=/usr/pgsql-9.5/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d > ${REPMGRDLOG} 2>&1
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStart=/usr/pgsql-9.5/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d >> ${REPMGRDLOG} 2>&1
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.5/repmgr/EL-7/repmgr-9.5.service b/rpm/redhat/9.5/repmgr/EL-7/repmgr-9.5.service
index d1d050f..14106c6 100644
--- a/rpm/redhat/9.5/repmgr/EL-7/repmgr-9.5.service
+++ b/rpm/redhat/9.5/repmgr/EL-7/repmgr-9.5.service
@@ -15,6 +15,7 @@ After=network.target
 [Service]
 Type=forking
 
+PIDFile=/var/run/repmgr/repmgrd-9.5.pid
 User=postgres
 Group=postgres
 
@@ -26,9 +27,9 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.5.log
 # Where to send early-startup messages from the server 
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
-ExecStart=/usr/pgsql-9.5/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d > ${REPMGRDLOG} 2>&1
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStart=/usr/pgsql-9.5/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d >> ${REPMGRDLOG} 2>&1
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.5/repmgr/F-20/repmgr-9.5.service b/rpm/redhat/9.5/repmgr/F-20/repmgr-9.5.service
index d1d050f..14106c6 100644
--- a/rpm/redhat/9.5/repmgr/F-20/repmgr-9.5.service
+++ b/rpm/redhat/9.5/repmgr/F-20/repmgr-9.5.service
@@ -15,6 +15,7 @@ After=network.target
 [Service]
 Type=forking
 
+PIDFile=/var/run/repmgr/repmgrd-9.5.pid
 User=postgres
 Group=postgres
 
@@ -26,9 +27,9 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.5.log
 # Where to send early-startup messages from the server 
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
-ExecStart=/usr/pgsql-9.5/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d > ${REPMGRDLOG} 2>&1
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStart=/usr/pgsql-9.5/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d >> ${REPMGRDLOG} 2>&1
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.5/repmgr/F-21/repmgr-9.5.service b/rpm/redhat/9.5/repmgr/F-21/repmgr-9.5.service
index d1d050f..14106c6 100644
--- a/rpm/redhat/9.5/repmgr/F-21/repmgr-9.5.service
+++ b/rpm/redhat/9.5/repmgr/F-21/repmgr-9.5.service
@@ -15,6 +15,7 @@ After=network.target
 [Service]
 Type=forking
 
+PIDFile=/var/run/repmgr/repmgrd-9.5.pid
 User=postgres
 Group=postgres
 
@@ -26,9 +27,9 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.5.log
 # Where to send early-startup messages from the server 
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
-ExecStart=/usr/pgsql-9.5/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d > ${REPMGRDLOG} 2>&1
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStart=/usr/pgsql-9.5/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d >> ${REPMGRDLOG} 2>&1
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.5/repmgr/F-22/repmgr-9.5.service b/rpm/redhat/9.5/repmgr/F-22/repmgr-9.5.service
index d1d050f..14106c6 100644
--- a/rpm/redhat/9.5/repmgr/F-22/repmgr-9.5.service
+++ b/rpm/redhat/9.5/repmgr/F-22/repmgr-9.5.service
@@ -15,6 +15,7 @@ After=network.target
 [Service]
 Type=forking
 
+PIDFile=/var/run/repmgr/repmgrd-9.5.pid
 User=postgres
 Group=postgres
 
@@ -26,9 +27,9 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.5.log
 # Where to send early-startup messages from the server 
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
-ExecStart=/usr/pgsql-9.5/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d > ${REPMGRDLOG} 2>&1
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStart=/usr/pgsql-9.5/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d >> ${REPMGRDLOG} 2>&1
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
diff --git a/rpm/redhat/9.5/repmgr/F-23/repmgr-9.5.service b/rpm/redhat/9.5/repmgr/F-23/repmgr-9.5.service
index d1d050f..14106c6 100644
--- a/rpm/redhat/9.5/repmgr/F-23/repmgr-9.5.service
+++ b/rpm/redhat/9.5/repmgr/F-23/repmgr-9.5.service
@@ -15,6 +15,7 @@ After=network.target
 [Service]
 Type=forking
 
+PIDFile=/var/run/repmgr/repmgrd-9.5.pid
 User=postgres
 Group=postgres
 
@@ -26,9 +27,9 @@ Environment=REPMGRDLOG=/var/log/repmgr/repmgrd-9.5.log
 # Where to send early-startup messages from the server 
 # This is normally controlled by the global default set by systemd
 # StandardOutput=syslog
-ExecStart=/usr/pgsql-9.5/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d > ${REPMGRDLOG} 2>&1
-ExecStop=/usr/bin/kill -TERM ${PIDFILE}
-ExecReload=/usr/bin/kill -HUP ${PIDFILE}
+ExecStart=/usr/pgsql-9.5/bin/repmgrd -f ${REPMGRDCONF} -p ${PIDFILE} -d >> ${REPMGRDLOG} 2>&1
+ExecStop=/usr/bin/kill -TERM $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 # Give a reasonable amount of time for the server to start up/shut down
 TimeoutSec=300
-- 
2.5.0



view thread (16+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: repmgr.service
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox