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

Поиск
Список
Период
Сортировка
От Yugo NAGATA
Тема Re: Prevent writes on large objects in read-only transactions
Дата
Msg-id 20220629172950.86b9b60a09e5fb4865cb2dc6@sraoss.co.jp
обсуждение исходный текст
Ответ на Re: Prevent writes on large objects in read-only transactions  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Prevent writes on large objects in read-only transactions  (Michael Paquier <michael@paquier.xyz>)
Список 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>

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alexander Pyhalov
Дата:
Сообщение: Re: CREATE INDEX CONCURRENTLY on partitioned index
Следующее
От: Jelte Fennema
Дата:
Сообщение: Re: OpenSSL 3.0.0 compatibility