Re: [Patch] Optimize dropping of relation buffers using dlist

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: [Patch] Optimize dropping of relation buffers using dlist
Дата
Msg-id CAA4eK1KpxxtAchvbmnERhVzbfYXSzfRB_1d6k1zojQDA3mbAOw@mail.gmail.com
обсуждение исходный текст
Ответ на RE: [Patch] Optimize dropping of relation buffers using dlist  ("tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>)
Ответы Re: [Patch] Optimize dropping of relation buffers using dlist  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
On Tue, Dec 8, 2020 at 12:13 PM tsunakawa.takay@fujitsu.com
<tsunakawa.takay@fujitsu.com> wrote:
>
> From: Jamison, Kirk/ジャミソン カーク <k.jamison@fujitsu.com>
> > Because one of the rel's cached value was false, it forced the
> > full-scan path for TRUNCATE.
> > Is there a possible workaround for this?
>
> Hmm, the other two relfilenodes are for the TOAST table and index of the target table.  I think the INSERT didn't
accessthose TOAST relfilenodes because the inserted data was stored in the main storage.  But TRUNCATE always truncates
allthe three relfilenodes.  So, the standby had not opened the relfilenode for the TOAST stuff or cached its size when
replayingthe TRUNCATE. 
>
> I'm afraid this is more common than we can ignore and accept the slow traditional path, but I don't think of a good
ideato use the cached flag. 
>

I also can't think of a way to use an optimized path for such cases
but I don't agree with your comment on if it is common enough that we
leave this optimization entirely for the truncate path.

--
With Regards,
Amit Kapila.



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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: POC: Better infrastructure for automated testing of concurrency issues
Следующее
От: Masahiro Ikeda
Дата:
Сообщение: Re: About to add WAL write/fsync statistics to pg_stat_wal view