lo_compat_privileges
Fact — official short description: “Enables backward compatibility mode for privilege checks on large objects.”
Identity
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | off |
— | off |
How it works
Enables backward compatibility mode for privilege checks on large objects. A superuser or a role granted SET privilege can change it for the relevant session or configuration scope.
The compatibility mode restores pre-9.0 large-object privilege behavior for old applications. It weakens normal ownership/ACL enforcement around large objects and should be a temporary bridge while explicit GRANTs and ownership are corrected.
Monitor and change lo_compat_privileges together with default_with_oids, operator_precedence_warning, synchronize_seqscans. Validate on the relevant server role and real workload, then use its superuser context to choose session change, reload, or restart; a historical boot default is not the current effective value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the modern default and repair legacy clients/SQL that depend on lo_compat_privileges. Test migration at session scope first; do not make a compatibility switch permanent cluster policy. |
| OLAP | Regression-test ETL, generated SQL, and old drivers, where parsing/quoting assumptions hide. Performance is rarely a reason to change this switch. |
| Small nodes | Keep the default without a legacy requirement. If temporarily enabled, record owner, affected connections, and a removal date. |
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 | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Keeping a compatibility switch permanently instead of fixing the client.
- Testing in one session and deploying globally to unrelated applications.
- Confusing parsing compatibility with data or security compatibility.
- Forgetting to remove an override after the upgrade migration is complete.
Related parameters
default_with_oids · operator_precedence_warning · synchronize_seqscans · standard_conforming_strings · array_nulls · backslash_quote