Re: shared tempfile was not removed on statement_timeout
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>,
Masahiko Sawada <masahiko.sawada@2ndquadrant.com>, Justin Pryzby <pryzby@telsasoft.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>, "Bossart, Nathan" <bossartn@amazon.com>
Date: 2021-01-26T20:34:25Z
Lists: pgsql-hackers
On Wed, Jan 27, 2021 at 12:22 AM Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote: > At Tue, 26 Jan 2021 11:00:56 +0200, Heikki Linnakangas <hlinnaka@iki.fi> wrote in > > Don't we potentially have the same problem with all on_dsm_detach > > callbacks? Looking at the other on_dsm_detach callbacks, I don't see > > any CHECK_FOR_INTERRUPT() calls in them, but it seems fragile to > > assume that. > > > > I'd suggest adding HOLD/RESUME_INTERRUPTS() to dsm_detach(). At least > > around the removal of the callback from the list and calling the > > callback. Maybe even over the whole function. > > Yes, I first came up with HOLD/RESUME_QUERY_INTERRUPTS() to the same > location. +1, this seems like a good idea. This is a little bit like the code near the comments "Don't joggle the elbow of proc_exit".
Commits
-
Hold interrupts while running dsm_detach() callbacks.
- 637668fb1d17 14.0 landed
- 8a07e5bd8248 9.6.22 landed
- 4b426f77c3cf 10.17 landed
- acafdd9ed5f0 11.12 landed
- 840eda04ebc9 12.7 landed
- 9fe40913c45d 13.3 landed