summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFujii Masao2014-11-13 03:14:48 +0000
committerFujii Masao2014-11-13 03:14:48 +0000
commitc291503b1c8250c7ba6ca900b7ba2f85a64b1eb6 (patch)
tree8a9718c756942be40d89af6f28bf57a00bbc615b
parent677708032c4a4d37cdb2a4bd45726fc260308db7 (diff)
Rename pending_list_cleanup_size to gin_pending_list_limit.
Since this parameter is only for GIN index, it's better to add "gin" to the parameter name for easier understanding.
-rw-r--r--doc/src/sgml/config.sgml6
-rw-r--r--doc/src/sgml/gin.sgml10
-rw-r--r--doc/src/sgml/ref/create_index.sgml4
-rw-r--r--src/backend/access/common/reloptions.c2
-rw-r--r--src/backend/access/gin/ginfast.c4
-rw-r--r--src/backend/access/gin/ginutil.c2
-rw-r--r--src/backend/utils/misc/guc.c4
-rw-r--r--src/backend/utils/misc/postgresql.conf.sample2
-rw-r--r--src/bin/psql/tab-complete.c2
-rw-r--r--src/include/access/gin.h2
-rw-r--r--src/include/access/gin_private.h2
-rw-r--r--src/test/regress/expected/create_index.out4
-rw-r--r--src/test/regress/sql/create_index.sql2
13 files changed, 23 insertions, 23 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 6bfb7bbc11..ab8c2637d7 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -5911,10 +5911,10 @@ SET XML OPTION { DOCUMENT | CONTENT };
</listitem>
</varlistentry>
- <varlistentry id="guc-pending-list-cleanup-size" xreflabel="pending_list_cleanup_size">
- <term><varname>pending_list_cleanup_size</varname> (<type>integer</type>)
+ <varlistentry id="guc-gin-pending-list-limit" xreflabel="gin_pending_list_limit">
+ <term><varname>gin_pending_list_limit</varname> (<type>integer</type>)
<indexterm>
- <primary><varname>pending_list_cleanup_size</> configuration parameter</primary>
+ <primary><varname>gin_pending_list_limit</> configuration parameter</primary>
</indexterm>
</term>
<listitem>
diff --git a/doc/src/sgml/gin.sgml b/doc/src/sgml/gin.sgml
index 94d2d5c19d..262f1e452e 100644
--- a/doc/src/sgml/gin.sgml
+++ b/doc/src/sgml/gin.sgml
@@ -729,7 +729,7 @@
<acronym>GIN</> is capable of postponing much of this work by inserting
new tuples into a temporary, unsorted list of pending entries.
When the table is vacuumed, or if the pending list becomes larger than
- <xref linkend="guc-pending-list-cleanup-size">, the entries are moved to the
+ <xref linkend="guc-gin-pending-list-limit">, the entries are moved to the
main <acronym>GIN</acronym> data structure using the same bulk insert
techniques used during initial index creation. This greatly improves
<acronym>GIN</acronym> index update speed, even counting the additional
@@ -812,22 +812,22 @@
</varlistentry>
<varlistentry>
- <term><xref linkend="guc-pending-list-cleanup-size"></term>
+ <term><xref linkend="guc-gin-pending-list-limit"></term>
<listitem>
<para>
During a series of insertions into an existing <acronym>GIN</acronym>
index that has <literal>fastupdate</> enabled, the system will clean up
the pending-entry list whenever the list grows larger than
- <varname>pending_list_cleanup_size</>. To avoid fluctuations in observed
+ <varname>gin_pending_list_limit</>. To avoid fluctuations in observed
response time, it's desirable to have pending-list cleanup occur in the
background (i.e., via autovacuum). Foreground cleanup operations
- can be avoided by increasing <varname>pending_list_cleanup_size</>
+ can be avoided by increasing <varname>gin_pending_list_limit</>
or making autovacuum more aggressive.
However, enlarging the threshold of the cleanup operation means that
if a foreground cleanup does occur, it will take even longer.
</para>
<para>
- <varname>pending_list_cleanup_size</> can be overridden for individual
+ <varname>gin_pending_list_limit</> can be overridden for individual
GIN indexes by changing storage parameters, and which allows each
GIN index to have its own cleanup threshold.
For example, it's possible to increase the threshold only for the GIN
diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 21f7604ac0..1a23e27305 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -371,10 +371,10 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class=
</variablelist>
<variablelist>
<varlistentry>
- <term><literal>pending_list_cleanup_size</></term>
+ <term><literal>gin_pending_list_limit</></term>
<listitem>
<para>
- Custom <xref linkend="guc-pending-list-cleanup-size"> parameter.
+ Custom <xref linkend="guc-gin-pending-list-limit"> parameter.
This value is specified in kilobytes.
</para>
</listitem>
diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c
index 86d918fafb..c16b38eed8 100644
--- a/src/backend/access/common/reloptions.c
+++ b/src/backend/access/common/reloptions.c
@@ -218,7 +218,7 @@ static relopt_int intRelOpts[] =
},
{
{
- "pending_list_cleanup_size",
+ "gin_pending_list_limit",
"Maximum size of the pending list for this GIN index, in kilobytes.",
RELOPT_KIND_GIN
},
diff --git a/src/backend/access/gin/ginfast.c b/src/backend/access/gin/ginfast.c
index 96255104ac..25746995b5 100644
--- a/src/backend/access/gin/ginfast.c
+++ b/src/backend/access/gin/ginfast.c
@@ -26,7 +26,7 @@
#include "utils/rel.h"
/* GUC parameter */
-int pending_list_cleanup_size = 0;
+int gin_pending_list_limit = 0;
#define GIN_PAGE_FREESIZE \
( BLCKSZ - MAXALIGN(SizeOfPageHeaderData) - MAXALIGN(sizeof(GinPageOpaqueData)) )
@@ -426,7 +426,7 @@ ginHeapTupleFastInsert(GinState *ginstate, GinTupleCollector *collector)
* call it when it can do all the work in a single collection cycle. In
* non-vacuum mode, it shouldn't require maintenance_work_mem, so fire it
* while pending list is still small enough to fit into
- * pending_list_cleanup_size.
+ * gin_pending_list_limit.
*
* ginInsertCleanup() should not be called inside our CRIT_SECTION.
*/
diff --git a/src/backend/access/gin/ginutil.c b/src/backend/access/gin/ginutil.c
index ff1dd7ee51..d0458cfd0c 100644
--- a/src/backend/access/gin/ginutil.c
+++ b/src/backend/access/gin/ginutil.c
@@ -526,7 +526,7 @@ ginoptions(PG_FUNCTION_ARGS)
int numoptions;
static const relopt_parse_elt tab[] = {
{"fastupdate", RELOPT_TYPE_BOOL, offsetof(GinOptions, useFastUpdate)},
- {"pending_list_cleanup_size", RELOPT_TYPE_INT, offsetof(GinOptions,
+ {"gin_pending_list_limit", RELOPT_TYPE_INT, offsetof(GinOptions,
pendingListCleanupSize)}
};
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index db65c7688d..23cbe906a7 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -2543,12 +2543,12 @@ static struct config_int ConfigureNamesInt[] =
},
{
- {"pending_list_cleanup_size", PGC_USERSET, CLIENT_CONN_STATEMENT,
+ {"gin_pending_list_limit", PGC_USERSET, CLIENT_CONN_STATEMENT,
gettext_noop("Sets the maximum size of the pending list for GIN index."),
NULL,
GUC_UNIT_KB
},
- &pending_list_cleanup_size,
+ &gin_pending_list_limit,
4096, 64, MAX_KILOBYTES,
NULL, NULL, NULL
},
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index 6e8ea1e481..4a89cb7d9f 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -519,7 +519,7 @@
#bytea_output = 'hex' # hex, escape
#xmlbinary = 'base64'
#xmloption = 'content'
-#pending_list_cleanup_size = 4MB
+#gin_pending_list_limit = 4MB
# - Locale and Formatting -
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index be6ad7ea64..8c85425fc5 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -1172,7 +1172,7 @@ psql_completion(const char *text, int start, int end)
pg_strcasecmp(prev_wd, "(") == 0)
{
static const char *const list_INDEXOPTIONS[] =
- {"fillfactor", "fastupdate", "pending_list_cleanup_size", NULL};
+ {"fillfactor", "fastupdate", "gin_pending_list_limit", NULL};
COMPLETE_WITH_LIST(list_INDEXOPTIONS);
}
diff --git a/src/include/access/gin.h b/src/include/access/gin.h
index a0d4da84b0..433e56f20d 100644
--- a/src/include/access/gin.h
+++ b/src/include/access/gin.h
@@ -67,7 +67,7 @@ typedef char GinTernaryValue;
/* GUC parameters */
extern PGDLLIMPORT int GinFuzzySearchLimit;
-extern int pending_list_cleanup_size;
+extern int gin_pending_list_limit;
/* ginutil.c */
extern void ginGetStats(Relation index, GinStatsData *stats);
diff --git a/src/include/access/gin_private.h b/src/include/access/gin_private.h
index 4a8db5a500..333316d78e 100644
--- a/src/include/access/gin_private.h
+++ b/src/include/access/gin_private.h
@@ -326,7 +326,7 @@ typedef struct GinOptions
((relation)->rd_options && \
((GinOptions *) (relation)->rd_options)->pendingListCleanupSize != -1 ? \
((GinOptions *) (relation)->rd_options)->pendingListCleanupSize : \
- pending_list_cleanup_size)
+ gin_pending_list_limit)
/* Macros for buffer lock/unlock operations */
diff --git a/src/test/regress/expected/create_index.out b/src/test/regress/expected/create_index.out
index 45689d9950..3ecb238230 100644
--- a/src/test/regress/expected/create_index.out
+++ b/src/test/regress/expected/create_index.out
@@ -2244,14 +2244,14 @@ DROP TABLE array_gin_test;
-- Test GIN index's reloptions
--
CREATE INDEX gin_relopts_test ON array_index_op_test USING gin (i)
- WITH (FASTUPDATE=on, PENDING_LIST_CLEANUP_SIZE=128);
+ WITH (FASTUPDATE=on, GIN_PENDING_LIST_LIMIT=128);
\d+ gin_relopts_test
Index "public.gin_relopts_test"
Column | Type | Definition | Storage
--------+---------+------------+---------
i | integer | i | plain
gin, for table "public.array_index_op_test"
-Options: fastupdate=on, pending_list_cleanup_size=128
+Options: fastupdate=on, gin_pending_list_limit=128
--
-- HASH
diff --git a/src/test/regress/sql/create_index.sql b/src/test/regress/sql/create_index.sql
index 619558551e..e837676d28 100644
--- a/src/test/regress/sql/create_index.sql
+++ b/src/test/regress/sql/create_index.sql
@@ -658,7 +658,7 @@ DROP TABLE array_gin_test;
-- Test GIN index's reloptions
--
CREATE INDEX gin_relopts_test ON array_index_op_test USING gin (i)
- WITH (FASTUPDATE=on, PENDING_LIST_CLEANUP_SIZE=128);
+ WITH (FASTUPDATE=on, GIN_PENDING_LIST_LIMIT=128);
\d+ gin_relopts_test
--