Fix possible page corruption by ALTER TABLE .. SET TABLESPACE.
If a zeroed page is present in the heap, ALTER TABLE .. SET TABLESPACE will
set the LSN and TLI while copying it, which is wrong, and heap_xlog_newpage()
will do the same thing during replay, so the corruption propagates to any
standby. Note, however, that the bug can't be demonstrated unless archiving
is enabled, since in that case we skip WAL logging altogether, and the LSN/TLI
are not set.
Back-patch to 8.0; prior releases do not have tablespaces.
Analysis and patch by Jeff Davis. Adjustments for back-branches and minor
wordsmithing by me.
heapam.c (r188.8.131.52 -> r184.108.40.206)
tablecmds.c (r220.127.116.11 -> r18.104.22.168)
pgsql-committers by date
|Next:||From: Tom Lane||Date: 2010-07-29 18:29:52|
|Subject: pgsql: Work around a documentation toolchain problem by replacing the |
|Previous:||From: Robert Haas||Date: 2010-07-29 16:15:33|
|Subject: pgsql: Fix possible page corruption by ALTER TABLE ..|