Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cyhOn-0006C2-0Q for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Apr 2017 16:15:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cyhOm-0004sc-JV for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Apr 2017 16:15:08 +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 1cyhNJ-0002FO-E2 for pgsql-hackers@postgreSQL.org; Thu, 13 Apr 2017 16:13:37 +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 1cyhNG-0008Rm-T7 for pgsql-hackers@postgreSQL.org; Thu, 13 Apr 2017 16:13:36 +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 v3DGDU67006313; Thu, 13 Apr 2017 12:13:31 -0400 From: Tom Lane To: Andreas Karlsson cc: pgsql-hackers@postgreSQL.org, Andres Freund Subject: Re: Cutting initdb's runtime (Perl question embedded) In-reply-to: <972d541d-7285-53ff-ea71-dcbfd886570a@proxel.se> References: <30896.1492006367@sss.pgh.pa.us> <972d541d-7285-53ff-ea71-dcbfd886570a@proxel.se> Comments: In-reply-to Andreas Karlsson message dated "Wed, 12 Apr 2017 21:15:53 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6311.1492100010.1@sss.pgh.pa.us> Date: Thu, 13 Apr 2017 12:13:30 -0400 Message-ID: <6312.1492100010@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 Andreas Karlsson writes: > Here is my proof of concept patch. It does basically the same thing as > Andres's patch except that it handles quoted values a bit better and > does not try to support anything other than the regproc type. > The patch speeds up initdb without fsync from 0.80 seconds to 0.55 > seconds, which is a nice speedup, while adding a negligible amount of > extra work on compilation. I've pushed this with some mostly-cosmetic adjustments: * created a single subroutine that understands how to split DATA lines, rather than having several copies of the regex * rearranged the code so that the data structure returned by Catalog::Catalogs() isn't scribbled on (which was already happening before your patch, but it seemed pretty ugly to me) * stripped out the bootstrap-time name lookup code from all of reg* not just regproc. There's certainly lots more that could be done in the genbki code, but I think all we can justify at this stage of the development cycle is to get the low-hanging fruit for testing speedups. 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