Re: reducing the footprint of ScanKeyword (was Re: Large writable variables)
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Cc: 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-27T21:26:53Z
Lists: pgsql-hackers
Andrew Dunstan <andrew.dunstan@2ndquadrant.com> writes: > On 12/27/18 3:34 PM, Tom Lane wrote: >> ... that's a pretty thin argument, and if Getopt::Long is present even >> in the most minimal Perl installations then it's certainly moot. > It's bundled separately, but on both systems I looked at it's needed by > the base perl package. I don't recall ever seeing a system where it's > not available. I'm reasonably careful about what packages the buildfarm > requires, and it's used Getopt::Long from day one. 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. regards, tom lane
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