Skip site navigation (1) Skip section navigation (2)

pgsql: Scan the buffer pool just once, not once per fork,during relati

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Scan the buffer pool just once, not once per fork,during relati
Date: 2012-06-07 21:43:35
Message-ID: E1SckUR-0007W2-Ty@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Scan the buffer pool just once, not once per fork, during relation drop.

This provides a speedup of about 4X when NBuffers is large enough.
There is also a useful reduction in sinval traffic, since we
only do CacheInvalidateSmgr() once not once per fork.

Simon Riggs, reviewed and somewhat revised by Tom Lane

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/ece01aae479227d9836294b287d872c5a6146a11

Modified Files
--------------
src/backend/access/transam/twophase.c |    6 +---
src/backend/access/transam/xact.c     |    8 +---
src/backend/catalog/storage.c         |    6 +---
src/backend/storage/buffer/bufmgr.c   |   42 +++++++++++++++++++++-
src/backend/storage/buffer/localbuf.c |   40 ++++++++++++++++++++
src/backend/storage/smgr/smgr.c       |   65 +++++++++++++++++++++++++++++++--
src/include/storage/buf_internals.h   |    1 +
src/include/storage/bufmgr.h          |    1 +
src/include/storage/smgr.h            |    4 +-
9 files changed, 150 insertions(+), 23 deletions(-)

pgsql-committers by date

Next:From: Tom LaneDate: 2012-06-08 03:09:22
Subject: pgsql: Revert "Wake WALSender to reduce data loss at failover forasync
Previous:From: Peter EisentrautDate: 2012-06-07 21:11:13
Subject: pgsql: Message style improvements

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group