buffer refcount leak in foreign batch insert code

Поиск
Список
Период
Сортировка
От Alexander Pyhalov
Тема buffer refcount leak in foreign batch insert code
Дата
Msg-id b035780a740efd38dc30790c76927255@postgrespro.ru
обсуждение исходный текст
Ответы Re: buffer refcount leak in foreign batch insert code  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Hi.

We've found that in cases like the one attached, when we insert into 
foreign partition with batch_size set, buffer refcount leak is detected.

The above example we see a dozen of similar messages:

repro_small.sql:31: WARNING:  buffer refcount leak: [14621] 
(rel=base/16718/16732, blockNum=54, flags=0x93800000

The issue was introduced in the following commit

commit b676ac443b6a83558d4701b2dd9491c0b37e17c4
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Date:   Fri Jun 11 20:19:48 2021 +0200

     Optimize creation of slots for FDW bulk inserts

In this commit we avoid recreating slots for each batch. But it seems 
that created slots should still be cleared in the end of 
ExecBatchInsert().

At least the attached patch seems to fix the issue.
-- 
Best regards,
Alexander Pyhalov,
Postgres Professional
Вложения

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

Предыдущее
От: Jelte Fennema
Дата:
Сообщение: Re: Reorder connection markers in libpq TAP tests
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: buffer refcount leak in foreign batch insert code