pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Etsuro Fujita <etsuro.fujita@gmail.com>
Cc: Alexander Lakhin <exclusion@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17828: postgres_fdw leaks file descriptors on error and aborts aborted transaction in lack of fds
Date: Thu, 08 Feb 2024 19:20:35 -0500
Message-ID: <1278317.1707438035@sss.pgh.pa.us> (raw)
In-Reply-To: <20240209000734.st2xwkfsrz7izbnx@awork3.anarazel.de>
References: <17828-122da8cba23236be@postgresql.org>
	<423731.1678381075@sss.pgh.pa.us>
	<1adf8fee-5a9a-69c2-057a-87bbddebab9d@gmail.com>
	<CAPmGK15anMZdx_nYx8mTY+t0dPJiL3QFot-S4sGm7EJT_WnmhQ@mail.gmail.com>
	<CAPmGK15DF6EE7O6hTLbe5-fHvPDwEx9vm-BOCN3dsKOjZCo7bw@mail.gmail.com>
	<974582.1707411864@sss.pgh.pa.us>
	<20240208215920.myib264liwbkdndp@awork3.anarazel.de>
	<1273950.1707436232@sss.pgh.pa.us>
	<20240209000734.st2xwkfsrz7izbnx@awork3.anarazel.de>

Andres Freund <andres@anarazel.de> writes:
> I might be missing something here, but leaving the concrete crash aside, why
> is it ok for pgfdw_get_cleanup_result() etc to block during abort processing?

It's not pretty, for sure.  I thought briefly about postponing the
cleanup until we next try to use the connection, but I fear the
semantic side-effects of that would be catastrophic.  We can't leave
the remote's query sitting open long after the local transaction has
been canceled --- that risks undetected deadlocks, at the least.
I think all we can do is try to reduce the risk of failure during
transaction cleanup.

			regards, tom lane





view thread (15+ messages)  latest in thread

Message-ID: <1278317.1707438035@sss.pgh.pa.us>
Permalink:  ../1278317.1707438035@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1278317.1707438035@sss.pgh.pa.us

 · 

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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, thomas.munro@gmail.com, etsuro.fujita@gmail.com, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17828: postgres_fdw leaks file descriptors on error and aborts aborted transaction in lack of fds
  In-Reply-To: <1278317.1707438035@sss.pgh.pa.us>

* 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