Re: Decoding speculative insert with toast leaks memory

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Decoding speculative insert with toast leaks memory
Дата
Msg-id CAA4eK1Lc7XdcKXPpO+YBv-qXSSk2obLbjM6z5F7YKSzYpqazsg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Decoding speculative insert with toast leaks memory  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Decoding speculative insert with toast leaks memory  (Amit Langote <amitlangote09@gmail.com>)
Список pgsql-hackers
On Wed, Jun 16, 2021 at 8:18 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Amit Kapila <amit.kapila16@gmail.com> writes:
> > Pushed!
>
> skink reports that this has valgrind issues:
>
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2021-06-15%2020%3A49%3A26
>

The problem happens at line:
rel_sync_cache_relation_cb()
{
..
if (entry->map)
..

I think the reason is that before we initialize 'entry->map' in
get_rel_sync_entry(), the invalidation is processed as part of which
when we try to clean up the entry, it tries to access uninitialized
value. Note, this won't happen in HEAD as we initialize 'entry->map'
before we get to process any invalidation. We have fixed a similar
issue in HEAD sometime back as part of the commit 69bd60672a, so we
need to make a similar change in PG-13 as well.

This problem is introduced by commit d250568121 (Fix memory leak due
to RelationSyncEntry.map.) not by the patch in this thread, so keeping
Amit L and Osumi-San in the loop.

-- 
With Regards,
Amit Kapila.



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

Предыдущее
От: Yugo NAGATA
Дата:
Сообщение: Re: pgbench bug candidate: negative "initial connection time"
Следующее
От: vignesh C
Дата:
Сообщение: Re: Added schema level support for publication.