1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-24 09:27:52 +03:00

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.
This commit is contained in:
Robert Haas
2011-10-28 17:08:09 -04:00
parent b6335a3f1b
commit 53f1ca59b5
3 changed files with 38 additions and 5 deletions

View File

@@ -192,6 +192,8 @@ extern void DropDatabaseBuffers(Oid dbid);
#define RelationGetNumberOfBlocks(reln) \
RelationGetNumberOfBlocksInFork(reln, MAIN_FORKNUM)
extern bool BufferIsPermanent(Buffer buffer);
#ifdef NOT_USED
extern void PrintPinnedBufs(void);
#endif