Re: Ought to use heap_multi_insert() for pg_attribute/depend insertions?

Поиск
Список
Период
Сортировка
От michael@paquier.xyz
Тема Re: Ought to use heap_multi_insert() for pg_attribute/depend insertions?
Дата
Msg-id 20200701092418.GB10408@paquier.xyz
обсуждение исходный текст
Ответ на Re: Ought to use heap_multi_insert() for pg_attribute/depend insertions?  (Daniel Gustafsson <daniel@yesql.se>)
Ответы Re: Ought to use heap_multi_insert() for pg_attribute/depend insertions?  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Tue, Jun 30, 2020 at 02:25:07PM +0200, Daniel Gustafsson wrote:
> Ok, once the final state of this patchset is known I can take a stab at
> recording multiple dependencies with different behaviors as a separate
> patchset.

Thanks.  I have applied 0001 and 0002 today, in a reversed order
actually.

> If we do, we need to keep the cap consistent across all callers, else we'll end
> up with an API without an abstraction to make it worth more than saving a few
> lines of quite simple to read code.  Currently this is the case, but that might
> not always hold, so not sure it if it's worth it.

I am not sure either, still it looks worth thinking about it.
Attached is a rebased version of the last patch.  What this currently
holds is just the switch to heap_multi_insert() for the three catalogs
pg_attribute, pg_depend and pg_shdepend.  One point that looks worth
debating about is to how much to cap the data inserted at once.  This
uses 64kB for all three, with a number of slots chosen based on the
size of each record, similarly to what we do for COPY.
--
Michael

Вложения

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

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: [HACKERS] Cached plans and statement generalization
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Re: Autovacuum on partitioned table (autoanalyze)