Re: Prevent writes on large objects in read-only transactions - Mailing list pgsql-hackers

From Yugo NAGATA
Subject Re: Prevent writes on large objects in read-only transactions
Date
Msg-id 20220629172950.86b9b60a09e5fb4865cb2dc6@sraoss.co.jp
Whole thread Raw
In response to Re: Prevent writes on large objects in read-only transactions  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Prevent writes on large objects in read-only transactions
List pgsql-hackers
Hello Michael-san,

Thank you for reviewing the patch. I attached the updated patch.

On Thu, 16 Jun 2022 17:31:22 +0900
Michael Paquier <michael@paquier.xyz> wrote:

> Looking at the docs of large objects, as of "Client Interfaces", we
> mention that any action must take place in a transaction block.
> Shouldn't we add a note that no write operations are allowed in a
> read-only transaction?

I added a description about read-only transaction to the doc.

> +   if (mode & INV_WRITE)
> +       PreventCommandIfReadOnly("lo_open() in write mode");
> Nit.  This breaks translation.  I think that it could be switched to
> "lo_open(INV_WRITE)" instead as the flag name is documented.

Changed it as you suggested.
 
> The patch is forgetting a refresh for largeobject_1.out.

I added changes for largeobject_1.out.

> ---   INV_READ  = 0x20000
> ---   INV_WRITE = 0x40000
> +--   INV_READ  = 0x40000
> +--   INV_WRITE = 0x20000
> Good catch!  This one is kind of independent, so I have fixed it
> separately, in all the expected output files.

Thanks!

-- 
Yugo NAGATA <nagata@sraoss.co.jp>

Attachment

pgsql-hackers by date:

Previous
From: Alexander Pyhalov
Date:
Subject: Re: CREATE INDEX CONCURRENTLY on partitioned index
Next
From: Jelte Fennema
Date:
Subject: Re: OpenSSL 3.0.0 compatibility