Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cz9Ai-0006uK-34 for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Apr 2017 21:54:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cz9Ah-0004E1-Mi for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Apr 2017 21:54:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cz9Ag-0004Dr-VZ for pgsql-hackers@postgresql.org; Fri, 14 Apr 2017 21:54:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cz9Ae-0000uh-5j for pgsql-hackers@postgresql.org; Fri, 14 Apr 2017 21:54:26 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v3ELsJce012003; Fri, 14 Apr 2017 17:54:20 -0400 From: Tom Lane To: Andres Freund cc: Andreas Karlsson , pgsql-hackers@postgresql.org Subject: Re: Cutting initdb's runtime (Perl question embedded) In-reply-to: <20170413204223.7znfwllhqmglzaam@alap3.anarazel.de> References: <30896.1492006367@sss.pgh.pa.us> <972d541d-7285-53ff-ea71-dcbfd886570a@proxel.se> <6312.1492100010@sss.pgh.pa.us> <20170413164132.3nhobp4z4wnnvhca@alap3.anarazel.de> <27409.1492102574@sss.pgh.pa.us> <20170413170614.6pv2mpqiq7s6huio@alap3.anarazel.de> <9244.1492106743@sss.pgh.pa.us> <20170413204223.7znfwllhqmglzaam@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Thu, 13 Apr 2017 13:42:23 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12001.1492206859.1@sss.pgh.pa.us> Date: Fri, 14 Apr 2017 17:54:19 -0400 Message-ID: <12002.1492206859@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andres Freund writes: > On 2017-04-13 14:05:43 -0400, Tom Lane wrote: >> Hm. That ties into something I was looking at yesterday. The only >> reason that function is called so much is that bootstrap mode runs a >> separate transaction for *each line of the bki file* (cf do_start, >> do_end in bootparse.y). Which seems pretty silly. > Indeed. I failed to resist the temptation to poke at this, and found that indeed nothing seems to break if we just use one transaction for the whole processing of postgres.bki. So I've pushed a patch that does that. We're definitely down to the point where worrying about the speed of bootstrap mode, per se, is useless; the other steps in initdb visibly take a lot more time. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers