<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">I’m trying to find a “best practice” for startup/shutdown of postgres by the pgpool scripts.  The scripts use the postgres wrapper script “pg_ctl”.  Using the pg_ctl script presents a problem  in that if postgres is started by pg_ctl, the
 system status command will return false status.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">pg_ctl start<o:p></o:p></p>
<p class="MsoNormal">waiting for server to start....2022-07-22 10:58:08.992 EDT [19552] LOG:  redirecting log output to logging collector process<o:p></o:p></p>
<p class="MsoNormal">2022-07-22 10:58:08.992 EDT [19552] HINT:  Future log output will appear in directory "log".<o:p></o:p></p>
<p class="MsoNormal">done<o:p></o:p></p>
<p class="MsoNormal"><b>server started<o:p></o:p></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">-bash-4.2$ sudo systemctl status postgresql-13<o:p></o:p></p>
<p class="MsoNormal">● postgresql-13.service - PostgreSQL 13 database server<o:p></o:p></p>
<p class="MsoNormal">   Loaded: loaded (/usr/lib/systemd/system/postgresql-13.service; enabled; vendor preset: disabled)<o:p></o:p></p>
<p class="MsoNormal">   <b>Active: inactive (dead) since Fri 2022-07-22 10:57:57 EDT; 30s ago<o:p></o:p></b></p>
<p class="MsoNormal">     Docs: <a href="https://www.postgresql.org/docs/13/static/">
https://www.postgresql.org/docs/13/static/</a><o:p></o:p></p>
<p class="MsoNormal">  Process: 1975 ExecStart=/usr/pgsql-13/bin/postmaster -D ${PGDATA} (code=exited, status=0/SUCCESS)<o:p></o:p></p>
<p class="MsoNormal">  Process: 1969 ExecStartPre=/usr/pgsql-13/bin/postgresql-13-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS)<o:p></o:p></p>
<p class="MsoNormal">Main PID: 1975 (code=exited, status=0/SUCCESS) <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I was previously given a recommendation (thanks Jon Schewe) to use polkit-1.  This quickly provided a response from others on my side to point out a vulnerability
<a href="https://github.blog/2021-06-10-privilege-escalation-polkit-root-on-linux-with-bug/">
https://github.blog/2021-06-10-privilege-escalation-polkit-root-on-linux-with-bug/</a>.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We want to use systemd process for auto start at boot.  If the answer is as simple as just modifying the scripts to use systemctl start as opposed to pg_ctl start, why do we still have pg_ctl included in the scripts provided by pgpool? 
 Based on this, I’d like to have a recommendation by pgpool developers for a “best-practice” method to handle starts and stops in the pgpool failover scripts. 
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-GB">Regards,<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:15.0pt"><b><span style="font-size:12.0pt;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></b></p>
<p class="MsoNormal" style="line-height:15.0pt"><b><span style="font-size:12.0pt;color:black;mso-fareast-language:EN-GB">Todd Stein</span></b><span style="font-size:12.0pt;color:#58595B;mso-fareast-language:EN-GB"><br>
Sr. Technical Success Manager<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:15.0pt"><span style="font-size:12.0pt;color:#58595B;mso-fareast-language:EN-GB">OpsBridge Technical Success<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:15.0pt"><span style="font-size:12.0pt;color:#58595B;mso-fareast-language:EN-GB">Micro Focus<br>
(Cell)</span><span style="font-size:12.0pt;color:red;mso-fareast-language:EN-GB">
</span><span lang="EN-US" style="font-size:12.0pt;mso-fareast-language:EN-GB">+1 (941) 248-8752 Mobile Number</span><span style="font-size:12.0pt;color:#58595B;mso-fareast-language:EN-GB"><br>
(Office)+1 404.774.1284<br>
</span><span style="font-size:12.0pt;color:#0179EF;mso-fareast-language:EN-GB"><a href="mailto:todd.stein@microfocus.com"><span style="color:#0563C1">todd.stein@microfocus.com</span></a></span><span style="font-size:12.0pt;color:#58595B;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<div>
<div class="MsoNormal" style="line-height:21.75pt"><span style="font-size:13.5pt;font-family:"Helvetica",sans-serif;color:#6D6E70;mso-fareast-language:EN-GB">
<hr size="1" width="100%" align="left">
</span></div>
</div>
<p class="MsoNormal"><span style="font-size:13.5pt;font-family:"Helvetica",sans-serif;color:#6D6E70;mso-fareast-language:EN-GB"><img border="0" width="85" height="21" style="width:.8833in;height:.2166in" id="Picture_x0020_2" src="cid:image001.png@01D89DB8.66C17F50"></span><span style="mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>