# gin_pending_list_limit

> gin_pending_list_limit is the PostgreSQL setting that defines the maximum size of the pending list for GIN index.
---

> [!NOTE]
> **Fact — official short description:** “Sets the maximum size of the pending list for GIN index.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `integer` | Upstream pg_settings type |
| Context | `user` | Settable by an ordinary user |
| Unit | `kB` | Raw unit |
| Range | `64` – `2147483647` | Raw limits in the last observed version |
| Enum values | — | — for non-enum types |
| Category | Client Connection Defaults / Statement Behavior | Upstream classification |
| Latest boot value | `4096` | 4 MiB |
{.fields meta="-"}

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG9.5 |
| Present in | PG9.5–19 Beta 3 |
| Removed in | No |
| Introduction commit | [`c291503b1c82`](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=c291503b1c8250c7ba6ca900b7ba2f85a64b1eb6) — Rename pending_list_cleanup_size to gin_pending_list_limit. |
| Commit date | 2014-11-13 |
| Discussion | — |

## Default history {#default-history}

| Versions | Raw `boot_val` | Unit | Human value |
| --- | --- | --- | --- |
| PG9.5–19 Beta 3 | `4096` | `kB` | 4 MiB |
{.full-width caption="Measured PG9.0–19 Beta 3 boot defaults"}

## How it works {#mechanism}

gin_pending_list_limit sets the maximum size of the pending list for GIN index. With a GIN index's fastupdate enabled, crossing this limit triggers bulk migration from the pending list into the main index; per-index storage parameters can override it.

gin_pending_list_limit is a USER-context setting. An authorized role can change it for a session, while ALTER ROLE or ALTER DATABASE can establish a default for future sessions.

GIN behavior also depends on per-index storage parameters, work or maintenance memory, autovacuum, and the shape of indexed values and predicates.

## Tuning advice {#tuning-advice}

> [!TIP]
> **Advice.** These are workload-specific starting points and must be validated with measurements.

| Workload | Guidance |
| --- | --- |
| OLTP | Change gin_pending_list_limit only after measuring the affected GIN maintenance or search path. Prefer an index-level override when one index, rather than the whole cluster, is exceptional. |
| OLAP | For batch loads or broad searches, test gin_pending_list_limit against ingestion latency, cleanup spikes, result completeness, and maintenance windows. |
| Small nodes | Do not raise gin_pending_list_limit merely because the default is reached; bound memory and I/O bursts, and keep exact-query semantics unless approximation is explicitly acceptable. |
{.full-width}

## Pigsty {#pigsty}

Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.

| Template | Effective value | Versus upstream boot | Source expression |
| --- | --- | --- | --- |
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
{.full-width}

> [!CAUTION]
> **Advice — pending human review.** Fact from the current Pigsty template projection: OLTP: PG9.5–19 Beta 3 unmodified; OLAP: PG9.5–19 Beta 3 unmodified; CRIT: PG9.5–19 Beta 3 unmodified; TINY: PG9.5–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

## Common pitfalls {#common-pitfalls}

- Changing gin_pending_list_limit in one session and assuming role defaults, database defaults, or other pooled sessions changed with it.
- Applying a cluster-wide GIN value to fix one exceptional index instead of using its storage parameters.
- Ignoring cleanup latency, I/O bursts, autovacuum interaction, or result completeness while tuning.
- Changing gin_pending_list_limit globally without a rollback plan and a client or operational compatibility test.

## Related parameters {#related-parameters}

[`gin_fuzzy_search_limit`](/parameters/gin-fuzzy-search-limit/) · [`maintenance_work_mem`](/parameters/maintenance-work-mem/) · [`work_mem`](/parameters/work-mem/) · [`vacuum_cleanup_index_scale_factor`](/parameters/vacuum-cleanup-index-scale-factor/) · [`autovacuum_work_mem`](/parameters/autovacuum-work-mem/)

## References {#references}

- [PostgreSQL 19 Beta 3 — gin_pending_list_limit](https://www.postgresql.org/docs/19/runtime-config-client.html#GUC-GIN-PENDING-LIST-LIMIT)
- [PostgreSQL 19 release notes](https://www.postgresql.org/docs/19/release-19.html)
- [Machine-readable GUC export](/data/guc.jsonl)
