From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: GIN pending clean up is not interruptable |
Date: | 2015-08-12 18:59:48 |
Message-ID: | CAMkU=1yMtXp5f4VeVHGCxf5EQgd7+0weRPNUL6rOmKtyD+zukg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Aug 11, 2015 at 5:27 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > On 2015-08-11 15:07:15 -0700, Jeff Janes wrote:
> >> The attached patch adds an else branch to call CHECK_FOR_INTERRUPTS().
> >>
> >> But I think we could instead just call vacuum_delay_point
> unconditionally.
> >> It calls CHECK_FOR_INTERRUPTS(), and if not in a throttled vacuum it
> does
> >> nothing else. (That is how ANALYZE handles it.)
>
> > Hm, I find that not exactly pretty. I'd rather just add an unconditional
> > CHECK_FOR_INTERRUPTS to the function.
>
> CHECK_FOR_INTERRUPTS is very cheap. But I tend to agree that you should
> be using vacuum_delay_point.
>
Attached patch does it that way. There was also a free-standing
CHECK_FOR_INTERRUPTS() which had no reason that I could see not be a
vacuum_delay_point, so I changed that one as well.
With this patch, ctrl-C and 'pg_ctl stop -mf' both behave nicely.
Cheers,
Jeff
Attachment | Content-Type | Size |
---|---|---|
gin_pendinglist_interrupt.patch | application/octet-stream | 1.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2015-08-12 19:08:08 | Re: [COMMITTERS] pgsql: Close some holes in BRIN page assignment |
Previous Message | Andres Freund | 2015-08-12 18:57:48 | Re: Raising our compiler requirements for 9.6 |