]> granicus.if.org Git - postgresql/commit
Only WAL-log the modified portion in an UPDATE, if possible.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 12 Mar 2014 20:46:04 +0000 (22:46 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 12 Mar 2014 21:28:36 +0000 (23:28 +0200)
commita3115f0d9ec1ac93b82156535dc00b10172a4fe7
tree675870269d119e1632d9345539efd11ac16d044e
parent17d787a3b160eefb2ff4a3fdf12ca1fedc02cbc1
Only WAL-log the modified portion in an UPDATE, if possible.

When a row is updated, and the new tuple version is put on the same page as
the old one, only WAL-log the part of the new tuple that's not identical to
the old. This saves significantly on the amount of WAL that needs to be
written, in the common case that most fields are not modified.

Amit Kapila, with a lot of back and forth with me, Robert Haas, and others.
src/backend/access/heap/heapam.c
src/backend/access/transam/xlog.c
src/include/access/heapam_xlog.h
src/include/access/xlog.h