Besides access method interface, major change is generic xlog interface. Now, generic xlog interface is more user friendly. Generic xlog compares initial and changed versions of page by itself. The only thing it can't do is to find data moves inside page, because it would be too high overhead. So in order to get compact WAL records one should use GenericXLogMemmove(dst, src, size) in order to move data inside page. If this function wasn't used then WAL records would just not so compact.
In general pattern of generic WAL usage is following.
1) Start using generic WAL: specify relation
GenericXLogStart(index);
2) Register buffers
GenericXLogRegister(0, buffer1, false);
GenericXLogRegister(1, buffer2, true);
first argument is a slot number, second is the buffer, third is flag indicating new buffer
3) Do changes in the pages. Use GenericXLogMemmove() if needed.
4) Finish using GenericXLogFinish(), or abort using GenericXLogAbort(). In the case of abort initial state of pages will be reverted.
Generic xlog takes care about critical section, unlogged relation, setting lsn, making buffer dirty. User code is just simple and clear.
------ Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company