pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andreas Karlsson <andreas@proxel.se>
Cc: pgsql-hackers@postgreSQL.org, Andres Freund <andres@anarazel.de>
Subject: Re: Cutting initdb's runtime (Perl question embedded)
Date: Thu, 13 Apr 2017 12:13:30 -0400
Message-ID: <6312.1492100010@sss.pgh.pa.us> (raw)
In-Reply-To: <972d541d-7285-53ff-ea71-dcbfd886570a@proxel.se>
References: <30896.1492006367@sss.pgh.pa.us>
	<a15e94ac-c346-5816-69ae-ec6811e32af1@proxel.se>
	<972d541d-7285-53ff-ea71-dcbfd886570a@proxel.se>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Andreas Karlsson <andreas@proxel.se> 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



view thread (52+ messages)  latest in thread

Message-ID: <6312.1492100010@sss.pgh.pa.us>
Permalink:  ../6312.1492100010@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6312.1492100010@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andreas@proxel.se, andres@anarazel.de
  Subject: Re: Cutting initdb's runtime (Perl question embedded)
  In-Reply-To: <6312.1492100010@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox