]> granicus.if.org Git - postgresql/commit
Use one transaction while reading postgres.bki, not one per line.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 14 Apr 2017 21:51:25 +0000 (17:51 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 14 Apr 2017 21:51:25 +0000 (17:51 -0400)
commit85a0781334a204c15c9c6ea9d3e6c75334c2beb6
tree165967f8a4ee544ef6e0fb371495287d1c2fbe8e
parent2040bb4a0b50ef0434a1a723f00d040ab4f1c06f
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
src/backend/bootstrap/bootparse.y
src/backend/bootstrap/bootstrap.c