[pgpool-hackers: 3979] Re: Proposal: using environment variables instead of script arguments

anirudh.goel at cern.ch anirudh.goel at cern.ch
Thu Jul 15 19:55:03 JST 2021


Hello Tatsuo

Actually, there might be another way to use environment variables instead of script arguments for all commands.

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?

I know this is an additional step to add but it will invoke consistency in how these parameters are passed by pgpool, across scripts.

Does this make any sense?

Cheers!

Anirudh
On 15 Jul 2021, 12:24 PM +0530, Tatsuo Ishii <ishii at sraoss.co.jp>, wrote:
> > Hello Tatsuo
> > > Unfortunately recovery commands are executed on the PostgreSQL primary
> > > node by calling pgpool_recovery extension. There's no way to pass
> > > environment variables from pgpool side. So my proposal is not applied
> > > to below commands.
> >
> > 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?
>
> Yeah, it seems it's the only way.
>
> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20210715/ddedf8f9/attachment-0001.htm>


More information about the pgpool-hackers mailing list