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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Use one transaction while reading postgres.bki, not one per line
Date: 2017-04-14 21:51:32
Message-ID: E1cz97s-0001Gg-Rs@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2017-04-14 23:37:25 pgsql: doc: Fix typo
Previous Message Tom Lane 2017-04-14 21:04:32 pgsql: Clean up manipulations of hash indexes' hasho_flag field.