Re: Snapshot leak warning with lo_export in subtransaction

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>, Andrew B <pgsql.20.drkshadow@spamgourmet.com>
Date: 2021-09-27T12:33:23Z
Lists: pgsql-bugs
On 2021-Sep-27, Heikki Linnakangas wrote:

> This should be backpatched to all supported versions. This adds an argument
> to 'inv_open' function, but I don't think there are extensions that use the
> inv_*() functions directly. inv_api.c relies on close_lo_relation() being
> called at the end of transaction, so I think an extension would find it hard
> to use those functions correctly, anyway.

Hmm, but you could also use a new value in its existing 'flags' argument
instead of changing ABI.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
Voy a acabar con todos los humanos / con los humanos yo acabaré
voy a acabar con todos (bis) / con todos los humanos acabaré ¡acabaré! (Bender)



Commits

  1. Fix snapshot reference leak if lo_export fails.