aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeSetOp.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2020-12-07 14:44:34 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2020-12-07 14:50:37 +0200
commite6dc04d436f1c5f173fc8b6e2f722f2d53719a92 (patch)
tree417207c77a6c01c6fa10202a7a21459cc7bf2e5f /src/backend/executor/nodeSetOp.c
parent7d43b76f6ed97b3b27f30114636f7b116009ef61 (diff)
downloadpostgresql-e6dc04d436f1c5f173fc8b6e2f722f2d53719a92.tar.gz
postgresql-e6dc04d436f1c5f173fc8b6e2f722f2d53719a92.zip
Fix more race conditions in the newly-added pg_rewind test.
pg_rewind looks at the control file to check what timeline a server is on. But promotion doesn't immediately write a checkpoint, it merely writes an end-of-recovery WAL record. If pg_rewind runs immediately after promotion, before the checkpoint has completed, it will think think that the server is still on the earlier timeline. We ran into this issue a long time ago already, see commit 484a848a73f. It's a bit bogus that pg_rewind doesn't determine the timeline correctly until the end-of-recovery checkpoint has completed. We probably should fix that. But for now work around it by waiting for the checkpoint to complete before running pg_rewind, like we did in commit 484a848a73f. In the passing, tidy up the new test a little bit. Rerder the INSERTs so that the comments make more sense, remove a spurious CHECKPOINT call after pg_rewind has already run, and add --debug option, so that if this fails again, we'll have more data. Per buildfarm failure at https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=rorqual&dt=2020-12-06%2018%3A32%3A19&stg=pg_rewind-check. Backpatch to all supported versions. Discussion: https://www.postgresql.org/message-id/1713707e-e318-761c-d287-5b6a4aa807e8@iki.fi
Diffstat (limited to 'src/backend/executor/nodeSetOp.c')
0 files changed, 0 insertions, 0 deletions