Re: Adding some error context for lock wait failures

From: Zhang Mingli <zmlpostgres(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Steve Baldwin <steve(dot)baldwin(at)gmail(dot)com>
Subject: Re: Adding some error context for lock wait failures
Date: 2025-07-11 03:32:50
Message-ID: 3f234838-2e89-44a0-bd0f-c46525725c86@Spark
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Jul 11, 2025 at 10:53 +0800, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, wrote:
> Zhang Mingli <zmlpostgres(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2025-07-11 03:35:48 Re: Adding some error context for lock wait failures
Previous Message Dilip Kumar 2025-07-11 03:13:05 Re: CHECKPOINT unlogged data