bufmgr: Don't copy pages while writing out After the series of preceding commits introducing and using BufferBeginSetHintBits()/BufferSetHintBits16(), hint bits are not set anymore while IO is going on. Therefore we do not need to copy pages while they are being written out anymore.
For the same reason XLogSaveBufferForHint() now does not need to operate on a copy of the page anymore, but can instead use the normal XLogRegisterBuffer() mechanism. For that the assertions and comments to XLogRegisterBuffer() had to be updated to allow share-exclusive locked buffers to be registered. Reviewed-by: Melanie Plageman <[email protected]> Discussion: https://postgr.es/m/5ubipyssiju5twkb7zgqwdr7q2vhpkpmuelxfpanetlk6ofnop@hvxb4g2amb2d Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/41d3d64e87af3f16833b095032affe404443659b Modified Files -------------- src/backend/access/hash/hashpage.c | 2 +- src/backend/access/transam/xloginsert.c | 45 ++++++----------------------- src/backend/storage/buffer/bufmgr.c | 14 ++------- src/backend/storage/buffer/localbuf.c | 2 +- src/backend/storage/page/bufpage.c | 51 ++++++--------------------------- src/backend/storage/smgr/bulk_write.c | 2 +- src/include/storage/bufpage.h | 3 +- src/test/modules/test_aio/test_aio.c | 2 +- 8 files changed, 26 insertions(+), 95 deletions(-)
