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

anirudh.goel at cern.ch anirudh.goel at cern.ch
Fri Apr 30 05:51:01 JST 2021


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20210430/d01234cc/attachment.htm>


More information about the pgpool-hackers mailing list