postgresql/src/include
Robert Haas ea69a0dead Expand hash indexes more gradually.
Since hash indexes typically have very few overflow pages, adding a
new splitpoint essentially doubles the on-disk size of the index,
which can lead to large and abrupt increases in disk usage (and
perhaps long delays on occasion).  To mitigate this problem to some
degree, divide larger splitpoints into four equal phases.  This means
that, for example, instead of growing from 4GB to 8GB all at once, a
hash index will now grow from 4GB to 5GB to 6GB to 7GB to 8GB, which
is perhaps still not as smooth as we'd like but certainly an
improvement.

This changes the on-disk format of the metapage, so bump HASH_VERSION
from 2 to 3.  This will force a REINDEX of all existing hash indexes,
but that's probably a good idea anyway.  First, hash indexes from
pre-10 versions of PostgreSQL could easily be corrupted, and we don't
want to confuse corruption carried over from an older release with any
corruption caused despite the new write-ahead logging in v10.  Second,
it will let us remove some backward-compatibility code added by commit
293e24e507.

Mithun Cy, reviewed by Amit Kapila, Jesper Pedersen and me.  Regression
test outputs updated by me.

Discussion: http://postgr.es/m/CAD__OuhG6F1gQLCgMQNnMNgoCvOLQZz9zKYJQNYvYmmJoM42gA@mail.gmail.com
Discussion: http://postgr.es/m/CA+TgmoYty0jCf-pa+m+vYUJ716+AxM7nv_syvyanyf5O-L_i2A@mail.gmail.com
2017-04-03 23:46:33 -04:00
..
access Expand hash indexes more gradually. 2017-04-03 23:46:33 -04:00
bootstrap Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
catalog BRIN de-summarization 2017-04-01 16:10:04 -03:00
commands Add infrastructure to support EphemeralNamedRelation references. 2017-03-31 23:17:18 -05:00
common Sync pg_dump and pg_dumpall output 2017-03-22 10:20:13 -04:00
datatype Consistently declare timestamp variables as TimestampTz. 2017-02-23 15:57:08 -05:00
executor Add infrastructure to support EphemeralNamedRelation references. 2017-03-31 23:17:18 -05:00
fe_utils Allow psql variable substitution to occur in backtick command strings. 2017-04-01 21:44:54 -04:00
foreign Allow custom and foreign scans to have shutdown callbacks. 2017-02-26 13:41:12 +05:30
lib Support hashed aggregation with grouping sets. 2017-03-27 04:20:54 +01:00
libpq Allow SCRAM authentication, when pg_hba.conf says 'md5'. 2017-03-24 13:32:21 +02:00
mb ICU support 2017-03-23 15:28:48 -04:00
nodes Abstract logic to allow for multiple kinds of child rels. 2017-04-03 22:41:31 -04:00
optimizer Abstract logic to allow for multiple kinds of child rels. 2017-04-03 22:41:31 -04:00
parser Add infrastructure to support EphemeralNamedRelation references. 2017-03-31 23:17:18 -05:00
port Enable 64 bit atomics on ARM64. 2017-03-10 11:19:54 -08:00
portability Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
postmaster Make header self-contained 2017-04-03 16:17:45 -04:00
regex Document intentional violations of header inclusion policy. 2017-03-08 17:01:13 -05:00
replication Cleanup slots during drop database 2017-03-28 10:05:21 -04:00
rewrite Remove deprecated COMMENT ON RULE syntax 2017-02-23 08:19:52 -05:00
snowball Document intentional violations of header inclusion policy. 2017-03-08 17:01:13 -05:00
statistics Fix uninitialized memory propagation mistakes 2017-03-27 14:52:19 -03:00
storage Remove direct uses of ItemPointer.{ip_blkid,ip_posid} 2017-03-28 19:02:23 -03:00
tcop Add infrastructure to support EphemeralNamedRelation references. 2017-03-31 23:17:18 -05:00
tsearch Full Text Search support for json and jsonb 2017-03-31 14:26:03 -04:00
utils Expand hash indexes more gradually. 2017-04-03 23:46:33 -04:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h Recommend wrappers of PG_DETOAST_DATUM_PACKED(). 2017-03-12 19:35:33 -04:00
fmgr.h Remove support for version-0 calling conventions. 2017-03-30 06:25:46 -07:00
funcapi.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
getaddrinfo.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
getopt_long.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
Makefile Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
miscadmin.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pg_config.h.in Cast result of copyObject() to correct type 2017-03-28 21:59:23 -04:00
pg_config.h.win32 Fix hardcoded typeof check result for Windows 2017-03-29 08:55:34 -04:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Fix default minimum value for descending sequences 2017-01-23 14:00:58 -05:00
pg_getopt.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pg_trace.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pgstat.h Show more processes in pg_stat_activity. 2017-03-26 22:02:22 -04:00
pgtar.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pgtime.h Fix incorrect comment: pgtime's tm_mon is 1-based, not 0-based. 2017-01-24 09:36:17 -05:00
port.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
postgres.h Recommend wrappers of PG_DETOAST_DATUM_PACKED(). 2017-03-12 19:35:33 -04:00
postgres_ext.h Move atooid() definition to a central place 2017-03-01 11:55:28 -05:00
postgres_fe.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
rusagestub.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
windowapi.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00