Work around failure with SPARC in base backup code As reported by buildfarm members thorntail and billbug, both running SPARC, 4a92c8c29bd0 is making the base backup code unstable on such platforms.
The only suspicion I have at this stage is a stack frame issue, pointing to something unrelated to 4a92c8c29bd0, that the addition of an array worth a size of PG_CONTROL_FILE_SIZE within perform_base_backup() is able to trigger. thorntail complained with a SIGBUS, pointing at misaligned access, with a sporadic failure. billbug complained with a SIGSEGV (siglongjmp issue with PG_ENSURE_ERROR_CLEANUP perhaps?) in a more stable fashion. The code is changed to use a palloc0() instead, which should cool down the problem with the stack, hopefully. Unfortunately, I could not test this hypothesis directly, lacking an environment able to do so. Discussion: https://postgr.es/m/[email protected] Backpatch-through: 15 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/9c299e2924c83aa28f168ed3b3a1d3191415e6e4 Modified Files -------------- src/backend/backup/basebackup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
