Re: [HACKERS] compute_index_stats is missing a CHECK_FOR_INTERRUPTS

2015-03-29 Thread Tom Lane
Jeff Janes writes: > On Sat, Mar 28, 2015 at 3:37 PM, Tom Lane wrote: >> 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 >> in

Re: [HACKERS] compute_index_stats is missing a CHECK_FOR_INTERRUPTS

2015-03-28 Thread Jeff Janes
On Sat, Mar 28, 2015 at 3:37 PM, Tom Lane wrote: > Jeff Janes 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() > rath

Re: [HACKERS] compute_index_stats is missing a CHECK_FOR_INTERRUPTS

2015-03-28 Thread Tom Lane
Jeff Janes 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

[HACKERS] compute_index_stats is missing a CHECK_FOR_INTERRUPTS

2015-03-28 Thread Jeff Janes
Analyze on functional indexes cannot be interrupted very easily. Example: create language plperl; create table foo1 as select x::text from generate_series(1,1000) foo (x); create table foo2 as select reverse(x) from foo1; --use a fast version to set up the demo, as we are impatient CREATE or repl