pgsql: Fix possible page corruption by ALTER TABLE ..

Поиск
Список
Период
Сортировка
От rhaas@postgresql.org (Robert Haas)
Тема pgsql: Fix possible page corruption by ALTER TABLE ..
Дата
Msg-id 20100729161533.BE50F7541D5@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
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.

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
    pgsql/src/backend/access/heap:
        heapam.c (r1.200.2.3 -> r1.200.2.4)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/heap/heapam.c?r1=1.200.2.3&r2=1.200.2.4)
    pgsql/src/backend/commands:
        tablecmds.c (r1.174.2.10 -> r1.174.2.11)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c?r1=1.174.2.10&r2=1.174.2.11)

В списке pgsql-committers по дате отправления:

Предыдущее
От: rhaas@postgresql.org (Robert Haas)
Дата:
Сообщение: pgsql: Fix possible page corruption by ALTER TABLE ..
Следующее
От: rhaas@postgresql.org (Robert Haas)
Дата:
Сообщение: pgsql: Fix possible page corruption by ALTER TABLE ..