Change the pgpool.service and sysconfig files to output Pgpool-II log.
authorBo Peng <pengbo@sraoss.co.jp>
Thu, 21 Dec 2017 05:42:39 +0000 (14:42 +0900)
committerBo Peng <pengbo@sraoss.co.jp>
Thu, 21 Dec 2017 05:59:38 +0000 (14:59 +0900)
Removeing "Type=forking" and add OPTS=" -n" to
run Pgpool-II with non-daemon mode, because we need to redirect logs.
Using "journalctl" command to see Pgpool-II systemd log.

src/redhat/pgpool.service
src/redhat/pgpool_rhel7.sysconfig

index 16aa5fdef0a43844bf8fcb976d2116492c79ec34..99fbadf05421e812b72b24324d64c35d9cdd35af 100644 (file)
@@ -3,7 +3,6 @@ Description=Pgpool-II
 After=syslog.target network.target
 
 [Service]
-Type=forking
 
 EnvironmentFile=-/etc/sysconfig/pgpool
 
index 96b4d9e934cf96af077cdb719574ec3c9fc1e5ef..5c76b39d3bcbcc266e49ab41507be5d095015a99 100644 (file)
@@ -1,7 +1,9 @@
 # Options for pgpool
 
-# If you want to use '-n' in START_OPTS, change the service type to simple in
-# the Pgpool-II service configuration file
-#OPTS=" -d"
+# -n: don't run in daemon mode. does not detatch control tty
+# -d: debug mode. lots of debug information will be printed
+
+#OPTS=" -d -n"
+OPTS=" -n"
 
 #STOP_OPTS=" -m fast"