Skip to content

Commit c291503

Browse files
committed
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.
1 parent 6777080 commit c291503

File tree

13 files changed

+23
-23
lines changed

13 files changed

+23
-23
lines changed

doc/src/sgml/config.sgml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5911,10 +5911,10 @@ SET XML OPTION { DOCUMENT | CONTENT };
59115911
</listitem>
59125912
</varlistentry>
59135913

5914-
<varlistentry id="guc-pending-list-cleanup-size" xreflabel="pending_list_cleanup_size">
5915-
<term><varname>pending_list_cleanup_size</varname> (<type>integer</type>)
5914+
<varlistentry id="guc-gin-pending-list-limit" xreflabel="gin_pending_list_limit">
5915+
<term><varname>gin_pending_list_limit</varname> (<type>integer</type>)
59165916
<indexterm>
5917-
<primary><varname>pending_list_cleanup_size</> configuration parameter</primary>
5917+
<primary><varname>gin_pending_list_limit</> configuration parameter</primary>
59185918
</indexterm>
59195919
</term>
59205920
<listitem>

doc/src/sgml/gin.sgml

+5-5
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@
729729
<acronym>GIN</> is capable of postponing much of this work by inserting
730730
new tuples into a temporary, unsorted list of pending entries.
731731
When the table is vacuumed, or if the pending list becomes larger than
732-
<xref linkend="guc-pending-list-cleanup-size">, the entries are moved to the
732+
<xref linkend="guc-gin-pending-list-limit">, the entries are moved to the
733733
main <acronym>GIN</acronym> data structure using the same bulk insert
734734
techniques used during initial index creation. This greatly improves
735735
<acronym>GIN</acronym> index update speed, even counting the additional
@@ -812,22 +812,22 @@
812812
</varlistentry>
813813

814814
<varlistentry>
815-
<term><xref linkend="guc-pending-list-cleanup-size"></term>
815+
<term><xref linkend="guc-gin-pending-list-limit"></term>
816816
<listitem>
817817
<para>
818818
During a series of insertions into an existing <acronym>GIN</acronym>
819819
index that has <literal>fastupdate</> enabled, the system will clean up
820820
the pending-entry list whenever the list grows larger than
821-
<varname>pending_list_cleanup_size</>. To avoid fluctuations in observed
821+
<varname>gin_pending_list_limit</>. To avoid fluctuations in observed
822822
response time, it's desirable to have pending-list cleanup occur in the
823823
background (i.e., via autovacuum). Foreground cleanup operations
824-
can be avoided by increasing <varname>pending_list_cleanup_size</>
824+
can be avoided by increasing <varname>gin_pending_list_limit</>
825825
or making autovacuum more aggressive.
826826
However, enlarging the threshold of the cleanup operation means that
827827
if a foreground cleanup does occur, it will take even longer.
828828
</para>
829829
<para>
830-
<varname>pending_list_cleanup_size</> can be overridden for individual
830+
<varname>gin_pending_list_limit</> can be overridden for individual
831831
GIN indexes by changing storage parameters, and which allows each
832832
GIN index to have its own cleanup threshold.
833833
For example, it's possible to increase the threshold only for the GIN

doc/src/sgml/ref/create_index.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,10 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class=
371371
</variablelist>
372372
<variablelist>
373373
<varlistentry>
374-
<term><literal>pending_list_cleanup_size</></term>
374+
<term><literal>gin_pending_list_limit</></term>
375375
<listitem>
376376
<para>
377-
Custom <xref linkend="guc-pending-list-cleanup-size"> parameter.
377+
Custom <xref linkend="guc-gin-pending-list-limit"> parameter.
378378
This value is specified in kilobytes.
379379
</para>
380380
</listitem>

src/backend/access/common/reloptions.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ static relopt_int intRelOpts[] =
218218
},
219219
{
220220
{
221-
"pending_list_cleanup_size",
221+
"gin_pending_list_limit",
222222
"Maximum size of the pending list for this GIN index, in kilobytes.",
223223
RELOPT_KIND_GIN
224224
},

src/backend/access/gin/ginfast.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "utils/rel.h"
2727

2828
/* GUC parameter */
29-
int pending_list_cleanup_size = 0;
29+
int gin_pending_list_limit = 0;
3030

3131
#define GIN_PAGE_FREESIZE \
3232
( BLCKSZ - MAXALIGN(SizeOfPageHeaderData) - MAXALIGN(sizeof(GinPageOpaqueData)) )
@@ -426,7 +426,7 @@ ginHeapTupleFastInsert(GinState *ginstate, GinTupleCollector *collector)
426426
* call it when it can do all the work in a single collection cycle. In
427427
* non-vacuum mode, it shouldn't require maintenance_work_mem, so fire it
428428
* while pending list is still small enough to fit into
429-
* pending_list_cleanup_size.
429+
* gin_pending_list_limit.
430430
*
431431
* ginInsertCleanup() should not be called inside our CRIT_SECTION.
432432
*/

src/backend/access/gin/ginutil.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ ginoptions(PG_FUNCTION_ARGS)
526526
int numoptions;
527527
static const relopt_parse_elt tab[] = {
528528
{"fastupdate", RELOPT_TYPE_BOOL, offsetof(GinOptions, useFastUpdate)},
529-
{"pending_list_cleanup_size", RELOPT_TYPE_INT, offsetof(GinOptions,
529+
{"gin_pending_list_limit", RELOPT_TYPE_INT, offsetof(GinOptions,
530530
pendingListCleanupSize)}
531531
};
532532

src/backend/utils/misc/guc.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2543,12 +2543,12 @@ static struct config_int ConfigureNamesInt[] =
25432543
},
25442544

25452545
{
2546-
{"pending_list_cleanup_size", PGC_USERSET, CLIENT_CONN_STATEMENT,
2546+
{"gin_pending_list_limit", PGC_USERSET, CLIENT_CONN_STATEMENT,
25472547
gettext_noop("Sets the maximum size of the pending list for GIN index."),
25482548
NULL,
25492549
GUC_UNIT_KB
25502550
},
2551-
&pending_list_cleanup_size,
2551+
&gin_pending_list_limit,
25522552
4096, 64, MAX_KILOBYTES,
25532553
NULL, NULL, NULL
25542554
},

src/backend/utils/misc/postgresql.conf.sample

+1-1
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@
519519
#bytea_output = 'hex' # hex, escape
520520
#xmlbinary = 'base64'
521521
#xmloption = 'content'
522-
#pending_list_cleanup_size = 4MB
522+
#gin_pending_list_limit = 4MB
523523

524524
# - Locale and Formatting -
525525

src/bin/psql/tab-complete.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,7 @@ psql_completion(const char *text, int start, int end)
11721172
pg_strcasecmp(prev_wd, "(") == 0)
11731173
{
11741174
static const char *const list_INDEXOPTIONS[] =
1175-
{"fillfactor", "fastupdate", "pending_list_cleanup_size", NULL};
1175+
{"fillfactor", "fastupdate", "gin_pending_list_limit", NULL};
11761176

11771177
COMPLETE_WITH_LIST(list_INDEXOPTIONS);
11781178
}

src/include/access/gin.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ typedef char GinTernaryValue;
6767

6868
/* GUC parameters */
6969
extern PGDLLIMPORT int GinFuzzySearchLimit;
70-
extern int pending_list_cleanup_size;
70+
extern int gin_pending_list_limit;
7171

7272
/* ginutil.c */
7373
extern void ginGetStats(Relation index, GinStatsData *stats);

src/include/access/gin_private.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ typedef struct GinOptions
326326
((relation)->rd_options && \
327327
((GinOptions *) (relation)->rd_options)->pendingListCleanupSize != -1 ? \
328328
((GinOptions *) (relation)->rd_options)->pendingListCleanupSize : \
329-
pending_list_cleanup_size)
329+
gin_pending_list_limit)
330330

331331

332332
/* Macros for buffer lock/unlock operations */

src/test/regress/expected/create_index.out

+2-2
Original file line numberDiff line numberDiff line change
@@ -2244,14 +2244,14 @@ DROP TABLE array_gin_test;
22442244
-- Test GIN index's reloptions
22452245
--
22462246
CREATE INDEX gin_relopts_test ON array_index_op_test USING gin (i)
2247-
WITH (FASTUPDATE=on, PENDING_LIST_CLEANUP_SIZE=128);
2247+
WITH (FASTUPDATE=on, GIN_PENDING_LIST_LIMIT=128);
22482248
\d+ gin_relopts_test
22492249
Index "public.gin_relopts_test"
22502250
Column | Type | Definition | Storage
22512251
--------+---------+------------+---------
22522252
i | integer | i | plain
22532253
gin, for table "public.array_index_op_test"
2254-
Options: fastupdate=on, pending_list_cleanup_size=128
2254+
Options: fastupdate=on, gin_pending_list_limit=128
22552255

22562256
--
22572257
-- HASH

src/test/regress/sql/create_index.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ DROP TABLE array_gin_test;
658658
-- Test GIN index's reloptions
659659
--
660660
CREATE INDEX gin_relopts_test ON array_index_op_test USING gin (i)
661-
WITH (FASTUPDATE=on, PENDING_LIST_CLEANUP_SIZE=128);
661+
WITH (FASTUPDATE=on, GIN_PENDING_LIST_LIMIT=128);
662662
\d+ gin_relopts_test
663663

664664
--

0 commit comments

Comments
 (0)