Re: [HACKERS] legitimacy of using PG_TRY , PG_CATCH , PG_END_TRY in C function - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: [HACKERS] legitimacy of using PG_TRY , PG_CATCH , PG_END_TRY in C function
Date
Msg-id CAMsr+YE6C_u-FWMRNNtkBDUbNn-hPW2zyGmL0kAc1P8+m9x--g@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] legitimacy of using PG_TRY , PG_CATCH , PG_END_TRY in C function  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
On 23 October 2017 at 16:16, Craig Ringer <craig@2ndquadrant.com> wrote:
> On 23 October 2017 at 08:30, John Lumby <johnlumby@hotmail.com> wrote:
>
>> All works but not perfectly --  at COMMIT,  resource_owner issues
>> relcache reference leak messages about relation scans not closed
>> and also about  snapshot still active.     I guess that the CREATE has
>> switched resource_owner and pushed a snapshot,  but I did not
>> debug in detail.
>
> A lot more work is required than what's done pg PG_CATCH to return to
> a queryable state. I've been down this path myself, and it's not fun.

Ignore me, Tom's example is probably more relevant to you since it
applies to subtransactions, not top-level query state.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: [HACKERS] legitimacy of using PG_TRY , PG_CATCH , PG_END_TRY in C function
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] legitimacy of using PG_TRY , PG_CATCH , PG_END_TRY inC function