Re: Prevent writes on large objects in read-only transactions

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Prevent writes on large objects in read-only transactions
Date: 2022-05-28 09:00:54
Message-ID: YpHkxkz75FYqhI/P@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 27, 2022 at 03:30:28PM +0900, Yugo NAGATA wrote:
> Currently, lo_creat(e), lo_import, lo_unlink, lowrite, lo_put,
> and lo_from_bytea are allowed even in read-only transactions.
> By using them, pg_largeobject and pg_largeobject_metatable can
> be modified in read-only transactions and the effect remains
> after the transaction finished. Is it unacceptable behaviours,
> isn't it?

Well, there is an actual risk to break applications that have worked
until now for a behavior that has existed for years with zero
complaints on the matter, so I would leave that alone. Saying that, I
don't really disagree with improving the error messages a bit if we
are in recovery.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2022-05-28 10:07:06 Re: Ignore heap rewrites for materialized views in logical replication
Previous Message Michael Paquier 2022-05-28 08:56:30 Re: pg_upgrade test writes to source directory