{"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"}],"derived_content_hash":"b3269504973d289efc5e5f2219095ec40e0882974d61853ca251dde66c4c6dc2","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"],"repair_provenance":{"original_source_revision":"english-manuals:7b9409a16a07641140ec9d32418928db0c5d3f3f9434760ab321d777b408ef46","receipt_sha256":"f888cbc9fcef2a6948ad7ee112c875b1a821833669f8aa31e139d25367a9af9f","repair":"wiki-repair-20261023"},"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":"wiki-repair-20261023:940f9c223933c5b8762ed3db45cf896ae732acfb4bd10a47b8bb7e5921a26113","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"lo_compat_privileges","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"lo_compat_privileges","SourceRevision":"wiki-repair-20261023:940f9c223933c5b8762ed3db45cf896ae732acfb4bd10a47b8bb7e5921a26113","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.","description_zh":"在 PostgreSQL 9.0 之前的版本中，大对象没有访问权限，因此始终可以被所有用户读取和写入。将此变量设置为 on 会禁用新的权限检查，以保持与之前版本的兼容性。默认值为 off。只有超级用户和具有适当 SET 权限的用户才能更改此设置。 设置此变量不会禁用所有与大对象相关的安全检查 — 只禁用那些在 PostgreSQL 9.0 中默认行为发生变化的检查。","description_zh_html":"\u003cp\u003e\n        在 \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e 9.0 之前的版本中，大对象没有访问权限，因此始终可以被所有用户读取和写入。将此变量设置为 \u003ccode class=\"literal\"\u003eon\u003c/code\u003e 会禁用新的权限检查，以保持与之前版本的兼容性。默认值为 \u003ccode class=\"literal\"\u003eoff\u003c/code\u003e。只有超级用户和具有适当 \u003ccode class=\"literal\"\u003eSET\u003c/code\u003e 权限的用户才能更改此设置。\n       \u003c/p\u003e\u003cp\u003e\n        设置此变量不会禁用所有与大对象相关的安全检查 — 只禁用那些在 \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e 9.0 中默认行为发生变化的检查。\n       \u003c/p\u003e","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","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/runtime-config-compatible.html","sha256":"01995ca3dfa6387ea699463dba924add2367e9a7fc4b9b43c1610c233e5e014b"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"unit":null,"vartype":"bool","zh_from":"same-version-pgdoc"},"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":"wiki-repair-20261023:940f9c223933c5b8762ed3db45cf896ae732acfb4bd10a47b8bb7e5921a26113","ContentHash":"be2a511907b13f530186d35d6813b0cbca78a66da680679ae0a38ec21522b3e7","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":"en","Fallback":false,"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","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
