diff --git a/contrib/hstore/expected/hstore.out b/contrib/hstore/expected/hstore.out index 3675eaa4582c2e113baf647be7edac13077b65fc..6872f2ca8d9b30135eeeb05256833a5f31d354d2 100755 --- a/contrib/hstore/expected/hstore.out +++ b/contrib/hstore/expected/hstore.out @@ -612,7 +612,6 @@ select count(*) from testhstore where h ? 'public'; drop index hidx; create index hidx on testhstore using gin (h); -ERROR: GIN indexes are not supported set enable_seqscan=off; select count(*) from testhstore where h @> 'wait=>NULL'; count diff --git a/gpdb-doc/dita/admin_guide/ddl/ddl-index.xml b/gpdb-doc/dita/admin_guide/ddl/ddl-index.xml index 95aef984d426043e97bb9ff6394619e3c86f00af..099dc5731669240d5dd28d54cf896210f6d70f96 100644 --- a/gpdb-doc/dita/admin_guide/ddl/ddl-index.xml +++ b/gpdb-doc/dita/admin_guide/ddl/ddl-index.xml @@ -90,7 +90,7 @@ VACUUM ANALYZE old_table; Index Types -

Greenplum Database supports the Postgres index types B-tree and GiST. Hash and GIN indexes +

Greenplum Database supports the Postgres index types B-tree, GiST, and GIN. Hash indexes are not supported. Each index type uses a different algorithm that is best suited to different types of queries. B-tree indexes fit the most common situations and are the default index type. See Synopsis CREATE [UNIQUE] INDEX name ON table -       [USING btree|bitmap|gist] +       [USING btree|bitmap|gist|gin]        ( {column | (expression)} [opclass] [, ...] )        [ WITH ( FILLFACTOR = value ) ]        [TABLESPACE tablespace] @@ -29,7 +29,7 @@ For example, an index computed on upper(col) would allow the clause WHERE upper(col) = 'JIM' to use an index.

-

Greenplum Database provides the index methods B-tree, bitmap, and GiST. +

Greenplum Database provides the index methods B-tree, bitmap, GiST, and GIN. Users can also define their own index methods, but that is fairly complicated.

When the WHERE clause is present, a partial index is @@ -85,11 +85,11 @@ - btree | bitmap | gist + btree | bitmap | gist | gin The name of the index method to be used. Choices are btree, bitmap, - and gist. The default method is + gist, and gin. The default method is btree. @@ -97,7 +97,7 @@ column The name of a column of the table on which to create the - index. Only the B-tree, bitmap, and GiST index + index. Only the B-tree, bitmap, GiST, and GIN index methods support multicolumn indexes. @@ -206,7 +206,7 @@ href="https://www.postgresql.org/docs/8.3/static/indexes-types.html" scope="external" format="html">PostgreSQL documentation.

-

The use of hash and GIN indexes has been disabled in Greenplum +

The use of hash indexes has been disabled in Greenplum Database.

diff --git a/gpdb-doc/dita/utility_guide/hstore.xml b/gpdb-doc/dita/utility_guide/hstore.xml index 122e9f4753304bb07847d53c1f351df2eb294380..2a40b93021355c08ddf6c35c67dc59e8012968e9 100644 --- a/gpdb-doc/dita/utility_guide/hstore.xml +++ b/gpdb-doc/dita/utility_guide/hstore.xml @@ -199,8 +199,12 @@ b
Indexes

hstore has index support for @> and ? - operators. You can use the GiST index type. For example:

- CREATE INDEX hidx ON testhstore USING GIST(h); + operators. You can use either GiST or GIN index types. For example:

+ +CREATE INDEX hidx ON testhstore USING GIST(h); + +CREATE INDEX hidx ON testhstore USING GIN(h); +
Examples @@ -237,4 +241,4 @@ b ...................
- \ No newline at end of file + diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index 19c992a0bf9f9d73908020b4e2afd352159a5a3c..d245f3f6b56a90618ce70904f84562a732cf79a3 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -419,12 +419,6 @@ DefineIndex(RangeVar *heapRelation, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("hash indexes are not supported"))); - /* MPP-9329: disable creation of GIN indexes */ - if (accessMethodId == GIN_AM_OID) - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("GIN indexes are not supported"))); - if (unique && !accessMethodForm->amcanunique) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 122ec2e7b9789637d6fa5ddb8f81c89c971c5b12..73f1267a637fd575b6929ad44400f8f7bbd4df1f 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -2040,12 +2040,11 @@ static struct config_int ConfigureNamesInt[] = 0, 0, INT_MAX, assign_tcp_keepalives_count, show_tcp_keepalives_count }, - /* MPP-9413: gin indexes are disabled */ { {"gin_fuzzy_search_limit", PGC_USERSET, CLIENT_CONN_OTHER, gettext_noop("Sets the maximum allowed result for exact search by GIN."), NULL, - GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE + GUC_GPDB_ADDOPT }, &GinFuzzySearchLimit, 0, 0, INT_MAX, NULL, NULL diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index eb6826f2389253633b764aa95bdc940060989624..9d6e4cdebce33c4b355a75bef83e846bd1b32559 100755 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -434,6 +434,7 @@ log_autostats=off # print additional autostats information #vacuum_freeze_min_age = 50000000 #vacuum_freeze_table_age = 150000000 #bytea_output='escape' +#gin_fuzzy_search_limit = 0 # - Locale and Formatting - diff --git a/src/test/regress/expected/create_index.out b/src/test/regress/expected/create_index.out index 84ae2f4d51bc57d0657e762c6638627120606a85..18645a92ca679786b6a72d075d7ccd069ea29124 100755 --- a/src/test/regress/expected/create_index.out +++ b/src/test/regress/expected/create_index.out @@ -176,7 +176,6 @@ SET enable_seqscan = OFF; SET enable_indexscan = ON; SET enable_bitmapscan = OFF; CREATE INDEX intarrayidx ON array_index_op_test USING gin (i); -ERROR: GIN indexes are not supported SELECT * FROM array_index_op_test WHERE i @> '{32}' ORDER BY seqno; seqno | i | t -------+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------ @@ -264,7 +263,6 @@ SELECT * FROM array_index_op_test WHERE i = '{47,77}' ORDER BY seqno; (1 row) CREATE INDEX textarrayidx ON array_index_op_test USING gin (t); -ERROR: GIN indexes are not supported SELECT * FROM array_index_op_test WHERE t @> '{AAAAAAAA72908}' ORDER BY seqno; seqno | i | t -------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------- @@ -420,9 +418,7 @@ SELECT * FROM array_index_op_test WHERE i = '{47,77}' ORDER BY seqno; -- And try it with a multicolumn GIN index DROP INDEX intarrayidx, textarrayidx; -ERROR: index "intarrayidx" does not exist CREATE INDEX botharrayidx ON array_index_op_test USING gin (i, t); -ERROR: GIN indexes are not supported SET enable_seqscan = OFF; SET enable_indexscan = ON; SET enable_bitmapscan = OFF;