Re: Speedup of relation deletes during recovery

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: Speedup of relation deletes during recovery
Дата
Msg-id CAEepm=1znm+ynXsja4_gKFJ9urLSG43Q4cObzHKim+FrJGJ17g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Speedup of relation deletes during recovery  (Andres Freund <andres@anarazel.de>)
Список 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 по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Speedup of relation deletes during recovery
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: Thinko/typo in ExecSimpleRelationInsert