Add sortsupport for gist_btree opclasses, for faster index builds

Enterprise / PostgreSQL - Heikki Linnakangas [iki.fi] - 7 April 2021 10:22 UTC

Commit 16fa9b2b30 introduced a faster way to build GiST indexes, by sorting all the data. This commit adds the sortsupport functions needed to make use of that feature for btree_gist.

Author: Andrey Borodin Discussion: https://www.postgresql.org/message-id/2F3F7265-0D22-44DB-AD71-8554C743D943@yandex-team.ru

9f984ba6d2 Add sortsupport for gist_btree opclasses, for faster index builds.
contrib/btree_gist/Makefile | 2 +-
contrib/btree_gist/btree_bit.c | 25 ++++
contrib/btree_gist/btree_bytea.c | 26 +++-
contrib/btree_gist/btree_cash.c | 80 ++++++++++++
contrib/btree_gist/btree_date.c | 27 +++++
contrib/btree_gist/btree_enum.c | 70 +++++++++++
contrib/btree_gist/btree_float4.c | 71 +++++++++++
contrib/btree_gist/btree_float8.c | 77 ++++++++++++
contrib/btree_gist/btree_gist--1.6--1.7.sql | 182 ++++++++++++++++++++++++++++
contrib/btree_gist/btree_gist.control | 2 +-
contrib/btree_gist/btree_gist.h | 1 +
contrib/btree_gist/btree_inet.c | 77 ++++++++++++
contrib/btree_gist/btree_int2.c | 70 +++++++++++
contrib/btree_gist/btree_int4.c | 70 +++++++++++
contrib/btree_gist/btree_int8.c | 80 ++++++++++++
contrib/btree_gist/btree_interval.c | 27 +++++
contrib/btree_gist/btree_macaddr.c | 78 ++++++++++++
contrib/btree_gist/btree_macaddr8.c | 78 ++++++++++++
contrib/btree_gist/btree_numeric.c | 29 +++++
contrib/btree_gist/btree_oid.c | 70 +++++++++++
contrib/btree_gist/btree_text.c | 25 ++++
contrib/btree_gist/btree_time.c | 27 +++++
contrib/btree_gist/btree_ts.c | 27 +++++
contrib/btree_gist/btree_uuid.c | 25 ++++
contrib/btree_gist/expected/bit.out | 7 ++
contrib/btree_gist/expected/bytea.out | 7 ++
contrib/btree_gist/expected/cash.out | 7 ++
contrib/btree_gist/expected/char.out | 7 ++
contrib/btree_gist/expected/cidr.out | 7 ++
contrib/btree_gist/expected/date.out | 7 ++
contrib/btree_gist/expected/enum.out | 7 ++
contrib/btree_gist/expected/float4.out | 7 ++
contrib/btree_gist/expected/float8.out | 7 ++
contrib/btree_gist/expected/inet.out | 7 ++
contrib/btree_gist/expected/int2.out | 7 ++
contrib/btree_gist/expected/int4.out | 7 ++
contrib/btree_gist/expected/int8.out | 7 ++
contrib/btree_gist/expected/interval.out | 7 ++
contrib/btree_gist/expected/macaddr.out | 7 ++
contrib/btree_gist/expected/macaddr8.out | 7 ++
contrib/btree_gist/expected/numeric.out | 7 ++
contrib/btree_gist/expected/oid.out | 7 ++
contrib/btree_gist/expected/text.out | 7 ++
contrib/btree_gist/expected/time.out | 7 ++
contrib/btree_gist/expected/timestamp.out | 7 ++
contrib/btree_gist/expected/timestamptz.out | 7 ++
contrib/btree_gist/expected/timetz.out | 7 ++
contrib/btree_gist/expected/uuid.out | 7 ++
contrib/btree_gist/expected/varbit.out | 7 ++
contrib/btree_gist/expected/varchar.out | 7 ++
contrib/btree_gist/sql/bit.sql | 4 +
contrib/btree_gist/sql/bytea.sql | 4 +
contrib/btree_gist/sql/cash.sql | 4 +
contrib/btree_gist/sql/char.sql | 4 +
contrib/btree_gist/sql/cidr.sql | 4 +
contrib/btree_gist/sql/date.sql | 4 +
contrib/btree_gist/sql/enum.sql | 4 +
contrib/btree_gist/sql/float4.sql | 4 +
contrib/btree_gist/sql/float8.sql | 4 +
contrib/btree_gist/sql/inet.sql | 4 +
contrib/btree_gist/sql/int2.sql | 4 +
contrib/btree_gist/sql/int4.sql | 4 +
contrib/btree_gist/sql/int8.sql | 4 +
contrib/btree_gist/sql/interval.sql | 4 +
contrib/btree_gist/sql/macaddr.sql | 4 +
contrib/btree_gist/sql/macaddr8.sql | 4 +
contrib/btree_gist/sql/numeric.sql | 4 +
contrib/btree_gist/sql/oid.sql | 4 +
contrib/btree_gist/sql/text.sql | 4 +
contrib/btree_gist/sql/time.sql | 4 +
contrib/btree_gist/sql/timestamp.sql | 4 +
contrib/btree_gist/sql/timestamptz.sql | 4 +
contrib/btree_gist/sql/timetz.sql | 4 +
contrib/btree_gist/sql/uuid.sql | 4 +
contrib/btree_gist/sql/varbit.sql | 4 +
contrib/btree_gist/sql/varchar.sql | 4 +
src/backend/access/gist/gistbuild.c | 1 +
77 files changed, 1530 insertions(+), 3 deletions(-)

Upstream: git.postgresql.org


  • Share