Re: reducing the footprint of ScanKeyword (was Re: Large writable variables)
David Fetter <david@fetter.org>
From: David Fetter <david@fetter.org>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Andrew Dunstan <andrew.dunstan@2ndquadrant.com>, John Naylor <jcnaylor@gmail.com>, Robert Haas <robertmhaas@gmail.com>, Andres Freund <andres@anarazel.de>, Andrew Gierth <andrew@tao11.riddles.org.uk>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2018-12-27T22:15:55Z
Lists: pgsql-hackers
On Thu, Dec 27, 2018 at 07:04:41PM -0300, Alvaro Herrera wrote: > On 2018-Dec-27, Tom Lane wrote: > > > I poked around a little on my own machines, and I can confirm that > > Getopt::Long is present in a default Perl install-from-source at > > least as far back as perl 5.6.1. It's barely conceivable that some > > packager might omit it from their minimal package, but Red Hat, > > Apple, NetBSD, and OpenBSD all include it. So it sure looks to > > me like relying on it should be non-problematic. > > In Debian it's included in package perl-modules-5.24, which packages > perl and libperl5.24 depend on. I suppose it's possible to install > perl-base and not install perl-modules, but it'd be a really bare-bones > machine. I'm not sure it's possible to build Postgres in such a > machine. $ corelist -a Getopt::Long Data for 2018-11-29 Getopt::Long was first released with perl 5 5 undef 5.001 undef 5.002 2.01 5.00307 2.04 5.004 2.10 5.00405 2.19 5.005 2.17 5.00503 2.19 5.00504 2.20 [much output elided] Fortunately, this has been part of Perl core a lot further back than we promise to support for builds, so I think we're clear to use it everywhere we process options. Best, David. -- David Fetter <david(at)fetter(dot)org> http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate
Commits
-
Use perfect hashing, instead of binary search, for keyword lookup.
- c64d0cd5ce24 12.0 landed
-
Reduce the size of the fmgr_builtin_oid_index[] array.
- 8ff5f824dca7 12.0 landed
-
Replace the data structure used for keyword lookup.
- afb0d0712f1a 12.0 landed