Re: BUG #18354: Aborted transaction aborted during cleanup when temp_file_limit exceeded - Mailing list pgsql-bugs

From Kyotaro Horiguchi
Subject Re: BUG #18354: Aborted transaction aborted during cleanup when temp_file_limit exceeded
Date
Msg-id 20240222.143815.1856873109774774353.horikyota.ntt@gmail.com
Whole thread Raw
In response to Re: BUG #18354: Aborted transaction aborted during cleanup when temp_file_limit exceeded  (Tender Wang <tndrwang@gmail.com>)
Responses Re: BUG #18354: Aborted transaction aborted during cleanup when temp_file_limit exceeded  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-bugs
At Thu, 22 Feb 2024 11:49:29 +0800, Tender Wang <tndrwang@gmail.com> wrote in 
> Changing the behavior of tuplestore can work for this issue,  but I'm not
> sure if this change will affect other components which depend on
> BufFile(like nodeMaterial)

Right. Regarding this type of error, the best we can do is to be
careful not to cause exceptions (elog/ereport(>=ERROR)) within the
abort code path. This is somewhat similar to the case of the
interaction between malloc() and signal handler.

First I tried to skip flushing in BufFileClose based on transaction
state and isInterXact state. However, that didn't seem that simple. We
could provide some flag to signal we're in the state where we cannot
error out, which BufFileClose refers to. That in turn can cause other
issues.

I mentioned that I haven't checked for the similar potential issues
BufFileClose can cause, but if nodeMaterial is that, the new function
could be usable for that.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #18358: I am not able to change the existing SQL connection to Postgres connection in existing application
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: BUG #18354: Aborted transaction aborted during cleanup when temp_file_limit exceeded