From e4309f73f698851a2f7d49ca5e98e3e188400891 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Thu, 3 Apr 2025 13:46:35 +0300 Subject: Add support for sorted gist index builds to btree_gist This enables sortsupport in the btree_gist extension for faster builds of gist indexes. Sorted gist index build strategy is the new default now. Regression tests are unchanged (except for one small change in the 'enum' test to add coverage for enum values added later) and are using the sorted build strategy instead. One version of this was committed a long time ago already, in commit 9f984ba6d2, but it was quickly reverted because of buildfarm failures. The failures were presumably caused by some small bugs, but we never got around to debug and commit it again. This patch was written from scratch, implementing the same idea, with some fragments and ideas from the original patch. Author: Bernd Helmle Author: Andrey Borodin Discussion: https://www.postgresql.org/message-id/64d324ce2a6d535d3f0f3baeeea7b25beff82ce4.camel@oopsware.de --- contrib/btree_gist/sql/enum.sql | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'contrib/btree_gist/sql/enum.sql') diff --git a/contrib/btree_gist/sql/enum.sql b/contrib/btree_gist/sql/enum.sql index 476211e9795..d662cb63221 100644 --- a/contrib/btree_gist/sql/enum.sql +++ b/contrib/btree_gist/sql/enum.sql @@ -1,6 +1,10 @@ -- enum check -create type rainbow as enum ('r','o','y','g','b','i','v'); +create type rainbow as enum ('r','o','g','b','i','v'); + +-- enum values added later take some different codepaths internally, +-- so make sure we have coverage for those too +alter type rainbow add value 'y' before 'g'; CREATE TABLE enumtmp (a rainbow); -- cgit v1.2.3