Re: Refactor UnpinBuffer()

Поиск
Список
Период
Сортировка
От Zhang Mingli
Тема Re: Refactor UnpinBuffer()
Дата
Msg-id d7f3e13a-fe27-4a91-bd72-969e9401cdaa@Spark
обсуждение исходный текст
Ответ на Re: Refactor UnpinBuffer()  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: Refactor UnpinBuffer()  (Aleksander Alekseev <aleksander@timescale.com>)
Список pgsql-hackers
HI,

On Sep 29, 2022, 05:08 +0800, Nathan Bossart <nathandbossart@gmail.com>, wrote:
On Wed, Sep 28, 2022 at 08:14:23PM +0300, Aleksander Alekseev wrote:
+ ResourceOwnerForgetBuffer(CurrentResourceOwner, b);
+
/* not moving as we're likely deleting it soon anyway */
ref = GetPrivateRefCountEntry(b, false);
Assert(ref != NULL);
-
- if (fixOwner)
- ResourceOwnerForgetBuffer(CurrentResourceOwner, b);
+1, Good catch.

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.

Regards,
Zhang Mingli

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: A potential memory leak on Merge Join when Sort node is not below Materialize node
Следующее
От: David Rowley
Дата:
Сообщение: Re: A potential memory leak on Merge Join when Sort node is not below Materialize node