From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: compute_index_stats is missing a CHECK_FOR_INTERRUPTS |
Date: | 2015-03-28 23:26:21 |
Message-ID: | CAMkU=1yeNKcY8nw-wfPCOQmHMGaDD_msib1dVYq7ff4v5MugbA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Mar 28, 2015 at 3:37 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Jeff Janes <jeff(dot)janes(at)gmail(dot)com> writes:
> > Analyze on functional indexes cannot be interrupted very easily.
> > ...
> > The attached patch fixes it, but don't vouch for its safety.
>
> Hm. The other per-sample-row loops in analyze.c use vacuum_delay_point()
> rather than CHECK_FOR_INTERRUPTS() directly. Ordinarily that wouldn't
> make much difference here, but maybe a slow index function might be
> incurring I/O?
>
That isn't the case for me (and if it were, they wouldn't be going through
the buffer manager anyway and so would not trigger delay criteria), but
that seems like a valid concern in general. It also explains why I
couldn't find CHECK_FOR_INTERRUPTS in other loops of that file, because I
was looking for the wrong spelling.
Adding a vacuum_delay_point does solve the immediately observed problem,
both the toy one and the more realistic one.
Thanks,
Jeff
Attachment | Content-Type | Size |
---|---|---|
compute_index_stats_vacdelay.patch | application/octet-stream | 511 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2015-03-29 00:07:05 | Re: Rounding to even for numeric data type |
Previous Message | Michael Paquier | 2015-03-28 22:59:59 | Re: Rounding to even for numeric data type |