- Notifications
You must be signed in to change notification settings - Fork28
Commite6dc04d
committed
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 writesan end-of-recovery WAL record. If pg_rewind runs immediately afterpromotion, before the checkpoint has completed, it will think think thatthe server is still on the earlier timeline. We ran into this issue a longtime ago already, see commit484a848.It's a bit bogus that pg_rewind doesn't determine the timeline correctlyuntil the end-of-recovery checkpoint has completed. We probably shouldfix that. But for now work around it by waiting for the checkpointto complete before running pg_rewind, like we did in commit484a848.In the passing, tidy up the new test a little bit. Rerder the INSERTs sothat the comments make more sense, remove a spurious CHECKPOINT call afterpg_rewind has already run, and add --debug option, so that if this failsagain, we'll have more data.Per buildfarm failure athttps://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.fi1 parent7d43b76 commite6dc04d
1 file changed
+15
-7
lines changedLines changed: 15 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
75 | 75 |
| |
76 | 76 |
| |
77 | 77 |
| |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
78 | 85 |
| |
79 | 86 |
| |
80 | 87 |
| |
| |||
99 | 106 |
| |
100 | 107 |
| |
101 | 108 |
| |
| 109 | + | |
| 110 | + | |
102 | 111 |
| |
103 | 112 |
| |
104 | 113 |
| |
105 | 114 |
| |
106 | 115 |
| |
107 | 116 |
| |
108 | 117 |
| |
| 118 | + | |
| 119 | + | |
| 120 | + | |
109 | 121 |
| |
110 | 122 |
| |
111 | 123 |
| |
| |||
114 | 126 |
| |
115 | 127 |
| |
116 | 128 |
| |
117 |
| - | |
118 |
| - | |
119 |
| - | |
120 |
| - | |
121 | 129 |
| |
122 | 130 |
| |
123 | 131 |
| |
| |||
139 | 147 |
| |
140 | 148 |
| |
141 | 149 |
| |
142 |
| - | |
| 150 | + | |
| 151 | + | |
143 | 152 |
| |
144 |
| - | |
| 153 | + | |
145 | 154 |
| |
146 | 155 |
| |
147 | 156 |
| |
| |||
153 | 162 |
| |
154 | 163 |
| |
155 | 164 |
| |
156 |
| - | |
157 | 165 |
| |
158 | 166 |
| |
159 | 167 |
| |
|
0 commit comments
Comments
(0)