Re: Decoding speculative insert with toast leaks memory

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: Decoding speculative insert with toast leaks memory
Дата
Msg-id CA+HiwqHeYxnx+_oZ9LtsUZUTDV0DjvBarA92DWZr9rrN=WAfhw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Decoding speculative insert with toast leaks memory  (Dilip Kumar <dilipbalaut@gmail.com>)
Ответы Re: Decoding speculative insert with toast leaks memory  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
Hi Dilip,

On Thu, Jun 17, 2021 at 4:45 PM Dilip Kumar <dilipbalaut@gmail.com> wrote:
> On Thu, Jun 17, 2021 at 12:52 PM Amit Langote <amitlangote09@gmail.com> wrote:
>
> > Oh I missed that the problem report is for the PG13 branch.
> >
> > How about the attached patch then?
> >
> Looks good,

Thanks for checking.

> one minor comment, how about making the below comment,
> same as on the head?
>
> - if (!found || !entry->replicate_valid)
> + if (!found)
> + {
> + /*
> + * Make the new entry valid enough for the callbacks to look at, in
> + * case any of them get invoked during the more complicated
> + * initialization steps below.
> + */
>
> On head:
> if (!found)
> {
> /* immediately make a new entry valid enough to satisfy callbacks */

Agree it's better to have the same comment in both branches.

Though, I think it should be "the new entry", not "a new entry".  I
find the sentence I wrote a bit more enlightening, but I am fine with
just fixing the aforementioned problem with the existing comment.

I've updated the patch.  Also, attaching a patch for HEAD for the
s/a/the change.  While at it, I also capitalized "immediately".

-- 
Amit Langote
EDB: http://www.enterprisedb.com

Вложения

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

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: pgbench logging broken by time logic changes