Re: Speedup of relation deletes during recovery - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Speedup of relation deletes during recovery
Date
Msg-id CAEepm=1znm+ynXsja4_gKFJ9urLSG43Q4cObzHKim+FrJGJ17g@mail.gmail.com
Whole thread Raw
In response to Re: Speedup of relation deletes during recovery  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Wed, Jun 27, 2018 at 4:17 PM, Andres Freund <andres@anarazel.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


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Speedup of relation deletes during recovery
Next
From: Ashutosh Bapat
Date:
Subject: Re: Thinko/typo in ExecSimpleRelationInsert