forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7403561
committed
BRIN revmap pages are not standard pages ...
... and therefore we ought not to tell XLogRegisterBuffer the opposite,when writing XLog for a brin update that moves the index tuple to adifferent page. Otherwise, xlog insertion would try to "compress thehole" when producing a full-page image for it; but since we don't updatepd_lower/upper, the hole covers the whole page. On WAL replay, therevmap page becomes empty and so the entire portion of the index isuseless and needs to be recomputed.This is low-probability: a BRIN update only moves an index tuple to adifferent page when the summary tuple is larger than the existing one,which doesn't happen with fixed-width datatypes. Also, the revmappage must be first after a checkpoint.Report and patch: Kuntal GhoshBug is alleged to have detected by a WAL-consistency-checking tool.Discussion:https://postgr.es/m/CAGz5QCJ=00UQjScSEFbV=0qO5ShTZB9WWz_Fm7+Wd83zPs9Geg@mail.gmail.comI posted a test case demonstrating the problem, but I'm refraining fromadding it to the test suite; if the WAL consistency tool makes it in,that will be a better way to catch this from regressing. (We shoulddefinitely have someting that causes not-same-page updates, though.)1 parent961bed0 commit7403561
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
287 | 287 |
| |
288 | 288 |
| |
289 | 289 |
| |
290 |
| - | |
| 290 | + | |
291 | 291 |
| |
292 | 292 |
| |
293 | 293 |
| |
|
0 commit comments
Comments
(0)