pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Prevent write operations on large objects in read-only transacti
Date: Mon, 04 Jul 2022 06:49:54 +0000
Message-ID: <E1o8Fu5-0017QG-Gf@gemulon.postgresql.org> (raw)

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/20220527153028.61a4608f66abcd026fd3806f@sraoss.co.jp

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/55f4802785f66a584c05dca40e5d9b25491674b2

Modified Files
--------------
doc/src/sgml/lobj.sgml                      |  4 ++-
src/backend/libpq/be-fsstubs.c              | 21 +++++++++++++
src/test/regress/expected/largeobject.out   | 49 +++++++++++++++++++++++++++++
src/test/regress/expected/largeobject_1.out | 49 +++++++++++++++++++++++++++++
src/test/regress/sql/largeobject.sql        | 44 ++++++++++++++++++++++++++
5 files changed, 166 insertions(+), 1 deletion(-)



Message-ID: <E1o8Fu5-0017QG-Gf@gemulon.postgresql.org>
Permalink:  ../E1o8Fu5-0017QG-Gf@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1o8Fu5-0017QG-Gf@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Prevent write operations on large objects in read-only transacti
  In-Reply-To: <E1o8Fu5-0017QG-Gf@gemulon.postgresql.org>
  References: <E1o8Fu5-0017QG-Gf@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox