Allow hint bits to be set sooner for temporary and unlogged tables.
authorRobert Haas <rhaas@postgresql.org>
Fri, 28 Oct 2011 21:08:09 +0000 (17:08 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 28 Oct 2011 21:08:09 +0000 (17:08 -0400)
commit53f1ca59b5875f1d3e95ee709ecaddcbdfdbd175
tree8b99d7bf6dd756a5994846ca6295dd4d15974503
parentb6335a3f1b33e5dc52e755956d8648f0813252c4
Allow hint bits to be set sooner for temporary and unlogged tables.

We need not wait until the commit record is durably on disk, because
in the event of a crash the page we're updating with hint bits will
be gone anyway.  Per off-list report from Heikki Linnakangas, this
can significantly degrade the performance of unlogged tables; I was
able to show a 2x speedup from this patch on a pgbench run with scale
factor 15.  In practice, this will mostly help small, heavily updated
tables, because on larger tables you're unlikely to run into the same
row again before the commit record makes it out to disk.
src/backend/storage/buffer/bufmgr.c
src/backend/utils/time/tqual.c
src/include/storage/bufmgr.h