pgsql: Allow hint bits to be set sooner for temporary and unlogged tabl

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Allow hint bits to be set sooner for temporary and unlogged tabl
Date: 2011-10-28 21:13:08
Message-ID: E1RJtjg-0003PT-FJ@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/53f1ca59b5875f1d3e95ee709ecaddcbdfdbd175

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 29 +++++++++++++++++++++++++++++
src/backend/utils/time/tqual.c | 12 +++++++-----
src/include/storage/bufmgr.h | 2 ++
3 files changed, 38 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2011-10-29 01:19:21 pgsql: Remove pg_upgrade dependency on the 'postgres' database existing
Previous Message Robert Haas 2011-10-28 21:05:43 pgsql: Demote some sanity checks in BufferIsValid() to assertions.