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

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Ought to use heap_multi_insert() for pg_attribute/depend insertions?
Дата
Msg-id 20200731024148.GB3317@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?  (Daniel Gustafsson <daniel@yesql.se>)
Список pgsql-hackers
On Thu, Jul 30, 2020 at 11:23:38PM +0200, Daniel Gustafsson wrote:
> Looks good, thanks.  Let's close the CF entry with this and open a new for the
> pg_depend part when that's done.

I have applied the patch, thanks.

And actually, I have found just after that CREATE DATABASE gets
severely impacted by the number of slots initialized when copying the
template dependencies if there are few of them.  The fix is as simple
as delaying the initialization of the slots once we know they will be
used.  In my initial tests, I was using fsync = off, so I missed that.
Sorry about that.  The attached fixes this regression by delaying the
slot initialization until we know that it will be used.  This does not
matter for pg_attribute as we know in advance the number of attributes
to insert.
--
Michael

Вложения

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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: Cache relation sizes?
Следующее
От: David Rowley
Дата:
Сообщение: Re: Index Skip Scan (new UniqueKeys)