{"Entry":{"collection":"guc","key":"lo_compat_privileges","name":"lo_compat_privileges","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Version and Platform Compatibility / Previous PostgreSQL Versions","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"8.4","status":"added","to":"9.0"},{"documentation_changed":true,"fields":{},"from":"9.2","status":"changed","to":"9.3"},{"documentation_changed":true,"fields":{},"from":"10","status":"changed","to":"11"},{"documentation_changed":true,"fields":{},"from":"14","status":"changed","to":"15"}],"content_hash":"6326bef43b43e383f63c666c7ce82a5937ed7e23f4feeb5fb247a49d82ed731e","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"off"}],"editorial":{"advice":{"olap":"Regression-test ETL, generated SQL, and old drivers, where parsing/quoting assumptions hide. Performance is rarely a reason to change this switch.","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.","small":"Keep the default without a legacy requirement. If temporarily enabled, record owner, affected connections, and a removal date."},"mechanism":["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."],"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."],"references":[{"title":"PostgreSQL 19 Beta 4: lo_compat_privileges","url":"https://www.postgresql.org/docs/19/runtime-config-compatible.html#GUC-LO-COMPAT-PRIVILEGES"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["default_with_oids","operator_precedence_warning","synchronize_seqscans","standard_conforming_strings","array_nulls","backslash_quote"],"summary":"lo_compat_privileges — Enables backward compatibility mode for privilege checks on large objects. Observed in PG9.0–19 Beta 4; its last measured boot default is off in PG19 Beta 4, with superuser context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"9.0","group":"Version and Platform Compatibility","group_slug":"compatible","imported_at":"2026-09-27T17:57:31.493586+08:00","intro_commit":{},"key":"lo_compat_privileges","last_version":"20","max_val":"","min_val":"","name":"lo_compat_privileges","position":213,"present_in":["9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"short_desc":"In PostgreSQL releases prior to 9.0, large objects did not have access privileges and were, therefore, always readable and writable by all users.","short_desc_zh":"","source_rev":"english-manuals:7b9409a16a07641140ec9d32418928db0c5d3f3f9434760ab321d777b408ef46","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"lo_compat_privileges","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"lo_compat_privileges","SourceRevision":"english-manuals:7b9409a16a07641140ec9d32418928db0c5d3f3f9434760ab321d777b408ef46","Facts":{"boot_val":"off","category":"Version and Platform Compatibility / Previous PostgreSQL Versions","context":"superuser","description":"In PostgreSQL releases prior to 9.0, large objects did not have access privileges and were, therefore, always readable and writable by all users. Setting this variable to on disables the new privilege checks, for compatibility with prior releases. The default is off. Only superusers and users with the appropriate SET privilege can change this setting. Setting this variable does not disable all security checks related to large objects — only those for which the default behavior has changed in PostgreSQL 9.0.","doc":{"anchor":"GUC-LO-COMPAT-PRIVILEGES","file":"runtime-config-compatible.html","lang":"en","sha256":"db2ecac1e62738d66a4932f4c8197976a349bcbf261c5b90fff740bc44867b8b","slug":"18"},"documented":true,"enumvals":null,"extra_desc":"Skips privilege checks when reading or modifying large objects, for compatibility with PostgreSQL releases prior to 9.0.","lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"lo_compat_privileges","short_desc":"Enables backward compatibility mode for privilege checks on large objects.","source":"pg-settings-source-snapshot","unit":null,"vartype":"bool"},"ManualEvidence":{"doc":{"anchor":"GUC-LO-COMPAT-PRIVILEGES","file":"runtime-config-compatible.html","lang":"en","sha256":"db2ecac1e62738d66a4932f4c8197976a349bcbf261c5b90fff740bc44867b8b","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"lo_compat_privileges","SourceDatabase":"center","Version":"18","Locale":"en","Title":"lo_compat_privileges","Summary":"In PostgreSQL releases prior to 9.0, large objects did not have access privileges and were, therefore, always readable and writable by all users. Setting this variable to on disables the new privilege checks, for compatibility with prior releases. The default is off. Only superusers and users with the appropriate SET privilege can change this setting. Setting this variable does not disable all security checks related to large objects — only those for which the default behavior has changed in PostgreSQL 9.0.","BodyHTML":"\u003cp\u003eIn PostgreSQL releases prior to 9.0, large objects did not have access privileges and were, therefore, always readable and writable by all users. Setting this variable to on disables the new privilege checks, for compatibility with prior releases. The default is off. Only superusers and users with the appropriate SET privilege can change this setting. Setting this variable does not disable all security checks related to large objects — only those for which the default behavior has changed in PostgreSQL 9.0.\u003c/p\u003e","SourceRevision":"english-manuals:7b9409a16a07641140ec9d32418928db0c5d3f3f9434760ab321d777b408ef46","ContentHash":"4d5cdd8a5d081dd99fb6e1a1e5de7e244ed0ece4d61c83ae0a42e51af033cf83","Payload":{"description":"In PostgreSQL releases prior to 9.0, large objects did not have access privileges and were, therefore, always readable and writable by all users. Setting this variable to on disables the new privilege checks, for compatibility with prior releases. The default is off. Only superusers and users with the appropriate SET privilege can change this setting. Setting this variable does not disable all security checks related to large objects — only those for which the default behavior has changed in PostgreSQL 9.0."}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
