From: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
---|---|
To: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, "Bossart, Nathan" <bossartn(at)amazon(dot)com> |
Subject: | Re: shared tempfile was not removed on statement_timeout |
Date: | 2021-01-31 01:26:31 |
Message-ID: | CA+hUKGLZ7Yu+_BTmx0B_xpjJoVMEPA-urB6pWq0if3MUxU=ypw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jan 27, 2021 at 9:34 AM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> On Wed, Jan 27, 2021 at 12:22 AM Kyotaro Horiguchi
> <horikyota(dot)ntt(at)gmail(dot)com> wrote:
> > At Tue, 26 Jan 2021 11:00:56 +0200, Heikki Linnakangas <hlinnaka(at)iki(dot)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".
So that gives a very simple back-patchable patch.
Attachment | Content-Type | Size |
---|---|---|
0001-Hold-interrupts-while-running-dsm_detach-callbacks.patch | text/x-patch | 1.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2021-01-31 01:39:10 | Re: Thoughts on "killed tuples" index hint bits support on standby |
Previous Message | Tom Lane | 2021-01-30 22:42:00 | Re: [sqlsmith] Failed assertion during partition pruning |