Re: fix oversight converting buf_id to Buffer

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: fix oversight converting buf_id to Buffer
Дата
Msg-id 20150810231537.GA22153@awork2.anarazel.de
обсуждение исходный текст
Ответ на fix oversight converting buf_id to Buffer  (Qingqing Zhou <zhouqq.postgres@gmail.com>)
Ответы Re: fix oversight converting buf_id to Buffer  (Qingqing Zhou <zhouqq.postgres@gmail.com>)
Re: fix oversight converting buf_id to Buffer  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Hi,

That's a very nice catch! Did you trigger the error or just found it
when reading the code?

On 2015-08-10 12:12:01 -0700, Qingqing Zhou wrote:
> Attached patch fixes oversights converting buf_id to Buffer in
> PrintBufferDescs() and InvalidateBuffer(). Especially for the latter,
> the reason we haven't seen any reports of the issue might be that it
> needs certain concurrent conditions to be true.

PrintBufferDescs() is dead code, so bit is not surprising. I'm also not
surprised that the wrong buffer in InvalidateBuffer()'s check doesn't
trigger. You'd have to have a cursor open in the current backend that
currently pins the off-by-one buffer.

I'm too tired right now to look at this, but it generally looked sane.

Regards,

Andres



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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: [patch] A \pivot command for psql
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Fix pg_dump to dump shell types.