diff options
author | Michael Paquier | 2022-07-04 06:48:52 +0000 |
---|---|---|
committer | Michael Paquier | 2022-07-04 06:48:52 +0000 |
commit | 55f4802785f66a584c05dca40e5d9b25491674b2 (patch) | |
tree | 418789eea818f7cb717227062db2e7feac63e3d8 /doc/src/sgml/lobj.sgml | |
parent | 8ba3cb2f1863e3243aa40d73633bd88f774f74ce (diff) |
Prevent write operations on large objects in read-only transactions
Attempting such an operation would already fail, but in various and
confusing ways. For example, while in recovery, some elog() messages
would be reported, but these should never be user-facing. This commit
restricts any write operations done on large objects in a read-only
context, so as the errors generated are more user-friendly. This is per
the discussion done with Tom Lane and Robert Haas.
Some regression tests are added to check the case of all the SQL
functions working on large objects (including an update of the test's
alternate output).
Author: Yugo Nagata
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'doc/src/sgml/lobj.sgml')
-rw-r--r-- | doc/src/sgml/lobj.sgml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/src/sgml/lobj.sgml b/doc/src/sgml/lobj.sgml index b767ba1d051..a27e91ecd2e 100644 --- a/doc/src/sgml/lobj.sgml +++ b/doc/src/sgml/lobj.sgml @@ -114,7 +114,9 @@ All large object manipulation using these functions <emphasis>must</emphasis> take place within an SQL transaction block, since large object file descriptors are only valid for the duration of - a transaction. + a transaction. Write operations, including <function>lo_open</function> + with the <symbol>INV_WRITE</symbol> mode, are not allowed in a read-only + transaction. </para> <para> |