From a3115f0d9ec1ac93b82156535dc00b10172a4fe7 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Wed, 12 Mar 2014 22:46:04 +0200 Subject: 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/include/access/xlog.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/include/access/xlog.h') diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h index a238292b76e..35092284664 100644 --- a/src/include/access/xlog.h +++ b/src/include/access/xlog.h @@ -279,6 +279,7 @@ typedef struct CheckpointStatsData extern CheckpointStatsData CheckpointStats; extern XLogRecPtr XLogInsert(RmgrId rmid, uint8 info, XLogRecData *rdata); +extern bool XLogCheckBufferNeedsBackup(Buffer buffer); extern void XLogFlush(XLogRecPtr RecPtr); extern bool XLogBackgroundFlush(void); extern bool XLogNeedsFlush(XLogRecPtr RecPtr); -- cgit v1.2.3