select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

CONFIGURATION / PRESET OPTIONS

max_index_keys

Read PG 18 manual ↗

Reports the maximum number of index keys.

Type
integer
Context
internal
Measured default
32
Unit
Metadata snapshot
18

Definition PG 18 manual

Reports the maximum number of index keys. It is determined by the value of INDEX_MAX_KEYS when building the server. The default value is 32 keys.

Measured default history
Version intervalDefault
9.0 – 1932
Analysis & operational context

Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗

How it works

Shows the maximum number of index keys. It is read-only and cannot be changed with SET or configuration-file edits.

It exposes the INDEX_MAX_KEYS build limit on index attributes, including key and INCLUDE columns where applicable.

Interpret it with max_function_args, max_identifier_length, block_size. Applications and operations tooling may read max_index_keys for capability or environment detection, but cannot SET it; cross-cluster comparisons must account for build, initdb, and current-database differences.

Operational considerations

Trying to change read-only max_index_keys with SET or a configuration file.

Assuming every cluster, database, or vendor build reports the same value.

Ignoring the value in file-format or feature-compatibility checks.

Treating reported metadata as a performance target instead of an environment fact.

Workload guidance

OLAP: Not tunable. Use max_index_keys to verify format, build, or resource assumptions on analytical nodes and keep every read/write candidate compatible.

OLTP: Not tunable. Record max_index_keys as a deployment/capability fact; if it is unexpected, fix the binary, initdb, or database-creation process rather than trying SET.

SMALL: Not tunable. Preserve it in inventory and incident reports; do not custom-build or rebuild merely to change it without a demonstrated compatibility need.

Related entries

Further reading

Definition snapshot: english-manuals:5d0059c3f38c741c7a1d9edd385… · English manual source