Re: Adding some error context for lock wait failures - Mailing list pgsql-hackers

From Zhang Mingli
Subject Re: Adding some error context for lock wait failures
Date
Msg-id 3f234838-2e89-44a0-bd0f-c46525725c86@Spark
Whole thread Raw
In response to Re: Adding some error context for lock wait failures  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

On Jul 11, 2025 at 10:53 +0800, Tom Lane <tgl@sss.pgh.pa.us>, wrote:
Zhang Mingli <zmlpostgres@gmail.com> writes:
Do we need to rollback error_context_stack to the previous state if we enter the branch for PG_CATCH()?

No. The PG_TRY mechanism itself deals with that: the next outer
level of PG_TRY will restore error_context_stack to what it had
been. If this were not so, most other places that add an
error_context_stack entry would also be broken.

Got it.  LGTM.


--
Zhang Mingli
HashData

pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: CHECKPOINT unlogged data
Next
From: Dilip Kumar
Date:
Subject: Re: Adding some error context for lock wait failures