Re: Speedup of relation deletes during recovery

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: Speedup of relation deletes during recovery
Date: 2018-06-27 04:33:44
Message-ID: CAEepm=1znm+ynXsja4_gKFJ9urLSG43Q4cObzHKim+FrJGJ17g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 27, 2018 at 4:17 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2018-06-27 15:56:58 +1200, Thomas Munro wrote:
>> Without range-scannable buffer mapping (Andres's radix tree thing),
>> that bet doesn't work out too well when you do it more than once.
>> Hmm... we could just... not do that?
>
> That'd probably hurt noticably too...

Allow the optimisation only once per transaction?

>> (Has anyone ever looked into a lazier approach to dropping buffers?)
>
> What precisely are you thinking of? We kinda now do something lazy-ish
> at EOXact...

I mean at the buffer level. If we did nothing at all, the problem
would be dirty buffers that you'd eventually try to write out to
non-existant files. What if... you just remembered recently dropped
relations, and then whenever writing dirty buffers (either because of
stealing or checkpointing) you could check if they belong to recently
dropped relations and just mark them clean? To garbage collect the
recently dropped list, you could somehow make use of the knowledge
that checkpoints and full clock hand cycles must drop all such
buffers. I'm not proposing anything, just musing and wondering if
anyone has looked into this sort of thing...

--
Thomas Munro
http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2018-06-27 04:39:21 Re: Thinko/typo in ExecSimpleRelationInsert
Previous Message Andres Freund 2018-06-27 04:17:01 Re: Speedup of relation deletes during recovery