<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto">Hello Tatsuo<br />
<br />
Actually, there might be another way to use environment variables instead of script arguments for all commands.<br />
<br />
When the pgpool executes recovery_1st_stage (or recovery_2nd_stage) script on the primary, can it (automatically, in the background) run an additional script before that? Maybe that script can put all these variables in the primary node host’s environment?<br />
<br />
I know this is an additional step to add but it will invoke consistency in how these parameters are passed by pgpool, across scripts.<br />
<br />
Does this make any sense?</div>
</div>
<div name="messageSignatureSection"><br />
<div class="matchFont">
<div dir="auto">Cheers!
<div dir="auto"><br /></div>
<div dir="auto">Anirudh</div>
</div>
</div>
</div>
<div name="messageReplySection">On 15 Jul 2021, 12:24 PM +0530, Tatsuo Ishii <ishii@sraoss.co.jp>, wrote:<br />
<blockquote type="cite" style="border-left-color: grey; border-left-width: thin; border-left-style: solid; margin: 5px 5px;padding-left: 10px;">
<blockquote type="cite">Hello Tatsuo<br />
<blockquote type="cite">Unfortunately recovery commands are executed on the PostgreSQL primary<br />
node by calling pgpool_recovery extension. There's no way to pass<br />
environment variables from pgpool side. So my proposal is not applied<br />
to below commands.<br /></blockquote>
<br />
Fair point. Then as per our other discussion, to pass PRIMARY_NODE_HOST to the recovery_1st_stage script, can we do it by passing it as an argument to the command?<br /></blockquote>
<br />
Yeah, it seems it's the only way.<br />
<br />
Best regards,<br />
--<br />
Tatsuo Ishii<br />
SRA OSS, Inc. Japan<br />
English: http://www.sraoss.co.jp/index_en.php<br />
Japanese:http://www.sraoss.co.jp<br /></blockquote>
</div>
</body>
</html>