sql_inheritance
Read PG 9.6 manual ↗This setting controls whether undecorated table references are considered to include inheritance child tables.
Historical documentation for a PostgreSQL version that is no longer supported.
- Type
- bool
- Context
- user
- Measured default
- on
- Unit
- —
- Metadata snapshot
- 9.6
Definition PG 9.6 manual
This setting controls whether undecorated table references are considered to include inheritance child tables. The default is on, which means child tables are included (thus, a * suffix is assumed by default). If turned off, child tables are not included (thus, an ONLY prefix is assumed). The SQL standard requires child tables to be included, so the off setting is not spec-compliant, but it is provided for compatibility with PostgreSQL releases prior to 7.1. See Section 5.9 for more information.
Turning sql_inheritance off is deprecated, because that behavior has been found to be error-prone as well as contrary to SQL standard. Discussions of inheritance behavior elsewhere in this manual generally assume that it is on.
Measured default history
| Version interval | Default |
|---|---|
| 9.0 – 9.6 | on |
Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗
How it works
PostgreSQL describes sql_inheritance as follows: “Causes subtables to be included by default in various commands.” It can be changed per session, which makes plan or behavior comparisons possible without changing every workload. The atlas measures it in PG9.0–9.6; boot_val is the compiled or initialized baseline, not proof of a running cluster's effective setting.
When enabled, this compatibility switch made commands operate on inheritance descendants unless ONLY was written. PostgreSQL 10 removed the switch: modern SQL uses ONLY to exclude descendants, while declarative partition pruning and constraint exclusion govern which child relations are scanned.
Read it together with constraint_exclusion, enable_partition_pruning, search_path, default_table_access_method. Check SHOW and pg_settings on the target server, verify the source and pending_restart fields, and compare workload, logs, and resource metrics before and after any change.
Operational considerations
Treating the measured boot_val for sql_inheritance as proof of the effective value on an initialized or managed cluster.
Applying a change as though it were immediate while pg_settings reports user context.
Changing this setting in isolation without checking the linked limits, observability, and rollback path.
Copying the removed name into a modern postgresql.conf instead of migrating to its documented successor.
Workload guidance
OLAP: For an upgrade or analytical estate, inventory every generated configuration before cutover. Map the old control to its successor and compare plans, throughput, WAL, or logging behavior rather than assuming the old numeric value is portable.
OLTP: Do not add this retired name to a current OLTP configuration. Translate its intent to the documented successor, test the migration under connection and write concurrency, and remove stale automation that still emits it.
SMALL: Delete the obsolete override after recording why it existed. On a small node, prefer the successor's default until measurements justify a new value; an unknown startup parameter can otherwise stop the server.
Version history 2
- PG 9.6 → 10removed
- PG 9.4 → 9.5changed
Related entries
Further reading
Definition snapshot: english-manuals:b10ef8698d61b3b57a0d67cfad3… · English manual source