Re: GenBKI emits useless open;close for catalogs without rows

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: GenBKI emits useless open;close for catalogs without rows
Дата
Msg-id 20230921222521.t4idqe4qvgyltnxn@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: GenBKI emits useless open;close for catalogs without rows  (Heikki Linnakangas <hlinnaka@iki.fi>)
Ответы Re: GenBKI emits useless open;close for catalogs without rows  (Matthias van de Meent <boekewurm+postgres@gmail.com>)
Список pgsql-hackers
Hi,

On 2023-09-19 21:05:41 +0300, Heikki Linnakangas wrote:
> On 18/09/2023 17:50, Matthias van de Meent wrote:
> > (initdb takes about 73ms locally with syncing disabled)
>
> That's impressive. It takes about 600 ms on my laptop. Of which about 140 ms
> goes into processing the BKI file. And that's with "initdb -no-sync" option.

I think there must be a digit missing in Matthias' numbers.


> > Various methods of reducing the size of postgres.bki were applied, as
> > detailed in the patch's commit message. I believe the current output
> > is still quite human readable.
>
> Overall this does not seem very worthwhile to me.

Because the wins are too small?

FWIW, Making postgres.bki smaller and improving bootstrapping time does seem
worthwhile to me. But it doesn't seem quite right to handle the batching in
the file format, it should be on the server side, no?

We really should stop emitting WAL during initdb...


> Looking at "perf" profile of initdb, I also noticed that a small but
> measurable amount of time is spent in the "isatty(0)" call in do_end(). Does
> anyone care about doing bootstrap mode interactively? We could probably
> remove that.

Heh, yea, that's pretty pointless.

Greetings,

Andres Freund



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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: CREATE FUNCTION ... SEARCH { DEFAULT | SYSTEM | SESSION }
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Disabling Heap-Only Tuples