Re: Refactor UnpinBuffer()

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: Refactor UnpinBuffer()
Дата
Msg-id CALj2ACUQWqfohD40zAUEX+EB0mjKTy_3MDct2ee+d-2DMV1y6g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Refactor UnpinBuffer()  (Aleksander Alekseev <aleksander@timescale.com>)
Ответы Re: Refactor UnpinBuffer()
Список pgsql-hackers
On Thu, Sep 29, 2022 at 1:52 PM Aleksander Alekseev
<aleksander@timescale.com> wrote:
>
> > Is it safe to move the call to ResourceOwnerForgetBuffer() to before the
> > call to GetPrivateRefCountEntry()? From my quick skim of the code, it
> > seems like it should be safe, but I thought I'd ask the question.
> >
> > Same question, have a look, it doesn’t seem to matter.
>
> Yep, I had some doubts here as well but it seems to be safe.

The commit 2d115e47c861878669ba0814b3d97a4e4c347e8b that removed the
last UnpinBuffer() call with fixOwner as false in ReleaseBuffer().
This commit is pretty old and +1 for removing the unused function
parameter.

Also, it looks like changing the order of GetPrivateRefCountEntry()
and ResourceOwnerForgetBuffer() doesn't have any effect as they are
independent, but do we want to actually do that if there's no specific
reason?

--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



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

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Avoid memory leaks during base backups
Следующее
От: Alvaro Herrera
Дата:
Сообщение: do away with ALTER TABLE "Recurse" subcmd types