Re: replication cleanup code incorrect way to use of HTAB HASH_REMOVE ?

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: replication cleanup code incorrect way to use of HTAB HASH_REMOVE ?
Дата
Msg-id CAA4eK1K+VZ1PwKj-Eo9UkdbcasjXu1ZrRA5WNkSZDpt4mGTZtw@mail.gmail.com
обсуждение исходный текст
Ответ на replication cleanup code incorrect way to use of HTAB HASH_REMOVE ?  (Peter Smith <smithpb2250@gmail.com>)
Ответы Re: replication cleanup code incorrect way to use of HTAB HASH_REMOVE ?  (Peter Smith <smithpb2250@gmail.com>)
Список pgsql-hackers
On Sat, Mar 20, 2021 at 12:54 PM Peter Smith <smithpb2250@gmail.com> wrote:
>
> PSA my patch to correct this by firstly doing a HASH_FIND, then only
> HASH_REMOVE after we've finished using the ent.
>

Why can't we keep using HASH_REMOVE as it is but get the output (entry
found or not) in the last parameter of hash_search API and then
perform Assert based on that? See similar usage in reorderbuffer.c and
rewriteheap.c.

-- 
With Regards,
Amit Kapila.



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Logical Replication vs. 2PC
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Replication slot stats misgivings