Thread: Re: pgsql: Don't try to print data type names in slot_store_error_callback(

On Fri, Jul 2, 2021 at 4:05 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> The existing code tried to do syscache lookups in an already-failed
> transaction, which is problematic to say the least.

Why didn't the assertion in SearchCatCacheInternal() catch this? Was
this code never actually tested?

-- 
Robert Haas
EDB: http://www.enterprisedb.com



Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Jul 2, 2021 at 4:05 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> The existing code tried to do syscache lookups in an already-failed
>> transaction, which is problematic to say the least.

> Why didn't the assertion in SearchCatCacheInternal() catch this? Was
> this code never actually tested?

It wasn't tested under conditions in which a catalog lookup would
be at real risk of failing --- and I'm not sure that we have any
way to do that mechanically.  See discussion downthread about when
a transaction could be considered "failed".

            regards, tom lane