pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Alexander Pyhalov <a.pyhalov@postgrespro.ru>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Subject: Re: ExecAppendAsyncEventWait() in REL_14_STABLE can corrupt PG_exception_stack
Date: Sat, 24 Feb 2024 10:06:29 +0900
Message-ID: <ZdlBFS25eKruiQvO@paquier.xyz> (raw)
In-Reply-To: <425fa29a429b21b0332737c42a4fdc70@postgrespro.ru>
References: <425fa29a429b21b0332737c42a4fdc70@postgrespro.ru>

On Fri, Feb 23, 2024 at 01:21:14PM +0300, Alexander Pyhalov wrote:
> Recent commit 555276f8594087ba15e0d58e38cd2186b9f39f6d introduced final
> cleanup of node->as_eventset in ExecAppendAsyncEventWait().
> Unfortunately, now this function can return in the middle of TRY/FINALLY
> block, without restoring PG_exception_stack.
> 
> We found this while working on our FDW. Unfortunately, I couldn't reproduce
> the issue with postgres_fdw, but it seems it is also affected.

Ugh, yes, you are obviously right that the early return is wrong.
I'll look into fixing that where appropriate.  Thanks for the report,
Alexander!
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (12+ messages)  latest in thread

Message-ID: <ZdlBFS25eKruiQvO@paquier.xyz>
Permalink:  ../ZdlBFS25eKruiQvO@paquier.xyz/
Also on:    postgresql.org/message-id/ZdlBFS25eKruiQvO@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: michael@paquier.xyz, a.pyhalov@postgrespro.ru
  Subject: Re: ExecAppendAsyncEventWait() in REL_14_STABLE can corrupt PG_exception_stack
  In-Reply-To: <ZdlBFS25eKruiQvO@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox