[pgpool-hackers: 3890] Re: Suggestion for patch in follow_primary.sh

Bo Peng pengbo at sraoss.co.jp
Fri Apr 30 09:37:22 JST 2021


Hi,

Thank you for your suggestion.
I am looking into it.

On Fri, 30 Apr 2021 02:21:01 +0530
<anirudh.goel at cern.ch> wrote:

> Hello pgpool hackers
> 
> I want to submit a patch for the latest version of pgpool. In the sample file for follow_primary.sh script, after the pg_rewind, we do this:
> 
> cat > ${RECOVERYCONF} << EOT
> primary_conninfo = 'host=${NEW_PRIMARY_NODE_HOST} port=${NEW_PRIMARY_NODE_PORT} user=${REPLUSER} application_name=${NODE_HOST} passfile=''/var/lib/pgsql/.pgpass'''
> recovery_target_timeline = 'latest'
> restore_command = 'scp ${NEW_PRIMARY_NODE_HOST}:${ARCHIVEDIR}/%f %p'
> primary_slot_name = '${NODE_HOST}'
> EOT
> 
> But we never tell the $NODE_HOST to actually use these changes in case of version >= 12.
> 
> I believe we have a missing command similar to the one after pg_basebackup:
> 
> if [ ${PGVERSION} -ge 12 ]; then
>  sed -i -e \"\\\$ainclude_if_exists = '$(echo ${RECOVERYCONF} | sed -e 's/\//\\\//g')'\" \
>  -e \"/^include_if_exists = '$(echo ${RECOVERYCONF} | sed -e 's/\//\\\//g')'/d\" ${NODE_PGDATA}/postgresql.conf
> fi
> 
> Can you please confirm that my theory is correct? If yes, would you like me to submit a patch for this?
> 
> Cheers!
> 
> Anirudh


-- 
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS, Inc. Japan


More information about the pgpool-hackers mailing list