pgsql: Fix WAL replay of locking an updated tuple

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема pgsql: Fix WAL replay of locking an updated tuple
Дата
Msg-id E1WJ20J-00080B-6I@gemulon.postgresql.org
обсуждение исходный текст
Ответы Re: pgsql: Fix WAL replay of locking an updated tuple  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-committers
Fix WAL replay of locking an updated tuple

We were resetting the tuple's HEAP_HOT_UPDATED flag as well as t_ctid on
WAL replay of a tuple-lock operation, which is incorrect when the tuple
is already updated.

Back-patch to 9.3.  The clearing of both header elements was there
previously, but since no update could be present on a tuple that was
being locked, it was harmless.

Bug reported by Peter Geoghegan and Greg Stark in
CAM3SWZTMQiCi5PV5OWHb+bYkUcnCk=O67w0cSswPvV7XfUcU5g@mail.gmail.com and
CAM-w4HPTOeMT4KP0OJK+mGgzgcTOtLRTvFZyvD0O4aH-7dxo3Q@mail.gmail.com
respectively; diagnosis by Andres Freund.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/6bfa88acd3df830a5f7e8677c13512b1b50ae813

Modified Files
--------------
src/backend/access/heap/heapam.c |   14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Fix WAL replay of locking an updated tuple
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Fix WAL replay of locking an updated tuple