[pgpool-hackers: 3980] Re: Proposal: using environment variables instead of script arguments
Tatsuo Ishii
ishii at sraoss.co.jp
Sat Jul 17 07:21:26 JST 2021
Hi Anirudh,
> 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?
Well, that can be technically possible but it pollutes PostgreSQL
process with environment variables. Also it is more complicated than
just adding a new parameter to the function. It seems it is not worth
the trouble.
> 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
More information about the pgpool-hackers
mailing list