Обсуждение: [COMMITTERS] pgsql: Use one transaction while reading postgres.bki,not one per line

Поиск
Список
Период
Сортировка

[COMMITTERS] pgsql: Use one transaction while reading postgres.bki,not one per line

От
Tom Lane
Дата:
Use one transaction while reading postgres.bki, not one per line.

AFAICT, the only actual benefit of closing a bootstrap transaction
is to reclaim transient memory.  We can do that a lot more cheaply
by just doing a MemoryContextReset on a suitable context.  This
gets the runtime of the "bootstrap" phase of initdb down to the
point where, at least by eyeball, it's quite negligible compared
to the rest of the phases.  Per discussion with Andres Freund.

Discussion: https://postgr.es/m/9244.1492106743@sss.pgh.pa.us

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/85a0781334a204c15c9c6ea9d3e6c75334c2beb6

Modified Files
--------------
src/backend/bootstrap/bootparse.y | 18 +++++++++++++-----
src/backend/bootstrap/bootstrap.c |  3 +++
2 files changed, 16 insertions(+), 5 deletions(-)