Re: check_recovery_target_lsn() does a PG_CATCH without a throw - Mailing list pgsql-hackers

From Tom Lane
Subject Re: check_recovery_target_lsn() does a PG_CATCH without a throw
Date
Msg-id 31260.1560264568@sss.pgh.pa.us
Whole thread Raw
In response to Re: check_recovery_target_lsn() does a PG_CATCH without a throw  (Sergei Kornilov <sk@zsrv.org>)
Responses Re: check_recovery_target_lsn() does a PG_CATCH without a throw
List pgsql-hackers
Sergei Kornilov <sk@zsrv.org> writes:
>> That's not OK.

> hmm. Did you mean catching only needed errors by errcode? Something like attached?

No, he means you can't EVER catch an error and not re-throw it, unless
you do a full (sub)transaction abort and cleanup instead of re-throwing.
We've been around on this repeatedly because people want to believe they
can take shortcuts.  (See e.g. discussions for the jsonpath stuff.)
It doesn't reliably work to do so, and we have a project policy against
trying, and this code should never have been committed in this state.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Jose Luis Tallon
Date:
Subject: Re: [PATCH] Implement uuid_version()
Next
From: Andres Freund
Date:
Subject: Re: check_recovery_target_lsn() does a PG_CATCH without a throw