Re: Move unused buffers to freelist

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Move unused buffers to freelist
Дата
Msg-id 006001ce584b$adfc55f0$09f501d0$@kapila@huawei.com
обсуждение исходный текст
Ответ на Re: Move unused buffers to freelist  (Jim Nasby <jim@nasby.net>)
Список pgsql-hackers
On Friday, May 24, 2013 2:47 AM Jim Nasby wrote:
> On 5/14/13 2:13 PM, Greg Smith wrote:
> > It is possible that we are told to put something in the freelist that
> > is already in it; don't screw up the list if so.
> >
> > I don't see where the code does anything to handle that though.  What
> was your intention here?
> 
> IIRC, the code that pulls from the freelist already deals with the
> possibility that a block was on the freelist but has since been put to
> use. 

You are right, the check exists in StrategyGetBuffer()

>If that's the case then there shouldn't be much penalty to adding
> a block multiple times (at least within reason...)

There is a check in StrategyFreeBuffer() which will not allow to put
multiple times, 
I had just used the same check in new function.

With Regards,
Amit Kapila.




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Move unused buffers to freelist
Следующее
От: amul sul
Дата:
Сообщение: Re: Patch to .gitignore