From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Pavan Deolasee <pavan.deolasee@gmail.com>
Cc: Jaime Casanova <jaime.casanova@2ndquadrant.com>
Cc: Haribabu Kommi <kommi.haribabu@gmail.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Patch: Write Amplification Reduction Method (WARM)
Date: Thu, 26 Jan 2017 00:26:48 -0300
Message-ID: <20170126032648.i2obutrun6k5bkle@alvherre.pgsql> (raw)
In-Reply-To: <20170125210832.p7johdmfnqvd2ysn@alvherre.pgsql>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Alvaro Herrera wrote:
> I wonder if heap_hot_search_buffer() and heap_hot_search() should return
> a tri-valued enum instead of boolean; that idea looks reasonable in
> theory but callers have to do more work afterwards, so maybe not.
>
> I think heap_hot_search() sometimes leaving the buffer pinned is
> confusing. Really, the whole idea of having heap_hot_search have a
> buffer output argument is an important API change that should be better
> thought. Maybe it'd be better to return the buffer pinned always, and
> the caller is always in charge of unpinning if not InvalidBuffer. Or
> perhaps we need a completely new function, given how different it is to
> the original? If you tried to document in the comment above
> heap_hot_search how it works, you'd find that it's difficult to
> describe, which'd be an indicator that it's not well considered.
Even before your patch, heap_hot_search claims to have the same API as
heap_hot_search_buffer "except that caller does not provide the buffer."
But this is a lie and has been since 9.2 (more precisely, since commit
4da99ea4231e). I think WARM makes things even worse and we should fix
that. Not yet sure which direction to fix it ...
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@2ndquadrant.com, pavan.deolasee@gmail.com, jaime.casanova@2ndquadrant.com, kommi.haribabu@gmail.com, tomas.vondra@2ndquadrant.com
Subject: Re: Patch: Write Amplification Reduction Method (WARM)
In-Reply-To: <20170126032648.i2obutrun6k5bkle@alvherre.pgsql>
* 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