Re: [HACKERS] CHECK_FOR_INTERRUPTS in spgdoinsert() isn't helpful

2014-05-29 Thread Tom Lane
Peter Geoghegan writes: > On Thu, May 29, 2014 at 1:42 PM, Tom Lane wrote: >> Not throw the error. (If we did, it'd turn into a PANIC, which doesn't >> seem like what we want.) > Of course, but it isn't obvious to me that that isn't what we'd want, > if the alternative is definitely that we'd b

Re: [HACKERS] CHECK_FOR_INTERRUPTS in spgdoinsert() isn't helpful

2014-05-29 Thread Peter Geoghegan
On Thu, May 29, 2014 at 1:42 PM, Tom Lane wrote: > Not throw the error. (If we did, it'd turn into a PANIC, which doesn't > seem like what we want.) Of course, but it isn't obvious to me that that isn't what we'd want, if the alternative is definitely that we'd be stuck in an infinite uninterrup

Re: [HACKERS] CHECK_FOR_INTERRUPTS in spgdoinsert() isn't helpful

2014-05-29 Thread Tom Lane
Peter Geoghegan writes: > On Thu, May 29, 2014 at 1:34 PM, Heikki Linnakangas > wrote: >> Also checking that CritSectionCount == 0 seems like a good idea... > What do you do if it isn't? Not throw the error. (If we did, it'd turn into a PANIC, which doesn't seem like what we want.)

Re: [HACKERS] CHECK_FOR_INTERRUPTS in spgdoinsert() isn't helpful

2014-05-29 Thread Tom Lane
Heikki Linnakangas writes: > On 05/29/2014 11:25 PM, Tom Lane wrote: >> In point of fact, we'd be happy to give up the locks and then throw >> the error. So I was thinking about inventing some macro or out-of-line >> function that went about like this: >> >> if (InterruptPending && (QueryCancelP

Re: [HACKERS] CHECK_FOR_INTERRUPTS in spgdoinsert() isn't helpful

2014-05-29 Thread Peter Geoghegan
On Thu, May 29, 2014 at 1:34 PM, Heikki Linnakangas wrote: > Also checking that CritSectionCount == 0 seems like a good idea... What do you do if it isn't? -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://w

Re: [HACKERS] CHECK_FOR_INTERRUPTS in spgdoinsert() isn't helpful

2014-05-29 Thread Heikki Linnakangas
On 05/29/2014 11:25 PM, Tom Lane wrote: One of the annoying things about the SPGiST bug Teodor pointed out is that once you're in the infinite loop, query cancel doesn't work to get you out of it. There are a couple of CHECK_FOR_INTERRUPTS() calls in spgdoinsert() that are meant to get you out o

[HACKERS] CHECK_FOR_INTERRUPTS in spgdoinsert() isn't helpful

2014-05-29 Thread Tom Lane
One of the annoying things about the SPGiST bug Teodor pointed out is that once you're in the infinite loop, query cancel doesn't work to get you out of it. There are a couple of CHECK_FOR_INTERRUPTS() calls in spgdoinsert() that are meant to get you out of exactly this sort of buggy-opclass situa