pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Optimize DropRelFileNodesAllBuffers() for recovery.
Date: Wed, 13 Jan 2021 02:32:54 +0000
Message-ID: <E1kzVxu-0001TS-8j@gemulon.postgresql.org> (raw)

Optimize DropRelFileNodesAllBuffers() for recovery.

Similar to commit d6ad34f341, this patch optimizes
DropRelFileNodesAllBuffers() by avoiding the complete buffer pool scan and
instead find the buffers to be invalidated by doing lookups in the
BufMapping table.

This optimization helps operations where the relation files need to be
removed like Truncate, Drop, Abort of Create Table, etc.

Author: Kirk Jamison
Reviewed-by: Kyotaro Horiguchi, Takayuki Tsunakawa, and Amit Kapila
Tested-By: Haiying Tang
Discussion: https://postgr.es/m/OSBPR01MB3207DCA7EC725FDD661B3EDAEF660@OSBPR01MB3207.jpnprd01.prod.outlook.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/bea449c635c0e68e21610593594c1e5d52842cdd

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 86 +++++++++++++++++++++++++++++++++----
src/backend/storage/smgr/smgr.c     | 12 +++---
src/include/storage/bufmgr.h        |  2 +-
3 files changed, 84 insertions(+), 16 deletions(-)



Message-ID: <E1kzVxu-0001TS-8j@gemulon.postgresql.org>
Permalink:  ../E1kzVxu-0001TS-8j@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kzVxu-0001TS-8j@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: akapila@postgresql.org
  Subject: Re: pgsql: Optimize DropRelFileNodesAllBuffers() for recovery.
  In-Reply-To: <E1kzVxu-0001TS-8j@gemulon.postgresql.org>
  References: <E1kzVxu-0001TS-8j@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox