[pgpool-general: 8226] Re: Patch for follow_primary.sh.sample
Bo Peng
pengbo at sraoss.co.jp
Mon Jun 20 17:28:16 JST 2022
hello,
> Working on an upgrade I noticed that this change that we made locally isn't in the latest sample scripts. I think this is something that is generic enough that it's useful to others.
Thank you for your patch.
Yes. You are correct.
I am going to commit your patch.
> --- follow_primary.sh.sample.orig 2022-06-16 13:07:55.894946094 -0500
> +++ follow_primary.sh.sample 2022-06-16 13:08:42.555015914 -0500
> @@ -38,6 +38,8 @@
> PCP_PORT=9898
> REPL_SLOT_NAME=${NODE_HOST//[-.]/_}
>
> +SSH_OPTIONS='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ~/.ssh/id_rsa_pgpool'
> +
> echo follow_primary.sh: start: Standby node ${NODE_ID}
>
> # Check the connection status of Standby
> @@ -89,7 +91,7 @@
> 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'
> +restore_command = 'scp ${SSH_OPTIONS} ${NEW_PRIMARY_NODE_HOST}:${ARCHIVEDIR}/%f %p'
> primary_slot_name = '${REPL_SLOT_NAME}'
> EOT
>
> @@ -120,7 +122,7 @@
> 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'
> +restore_command = 'scp ${SSH_OPTIONS} ${NEW_PRIMARY_NODE_HOST}:${ARCHIVEDIR}/%f %p'
> primary_slot_name = '${REPL_SLOT_NAME}'
> EOT
>
>
> Jon Schewe
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general
--
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS, Inc. Japan
https://www.sraoss.co.jp/
More information about the pgpool-general
mailing list