On Wed, Jun 27, 2018 at 4:17 PM, Andres Freund <and...@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