Re: Crash on UPDATE in 7.0beta3 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Crash on UPDATE in 7.0beta3
Date
Msg-id 3438.954695165@sss.pgh.pa.us
Whole thread Raw
In response to Crash on UPDATE in 7.0beta3  (Magnus Hagander <mha@sollentuna.net>)
Responses Re: Crash on UPDATE in 7.0beta3
List pgsql-hackers
Magnus Hagander <mha@sollentuna.net> writes:
> When running multiple concurrent backends on my benchmark database, I see
> consistent crashing when running with 8 clients, and sporadic crashes when
> running with 4. After the crash, at least one index is broken, so if I run
> it again, it will crash on that. When I rebuild my indexes, I get back to
> the same crash.
> It dies on the same query every time (but only when I have many concurrent
> backends - I can run it "alone" from psql without any problem). 

What are the other backends doing?

After chasing this logic a little bit, my suspicion is focused on
ExecIndexReScan at about nodeIndexscan.c:342.  If an inner indexscan
is restarted in the context of EvalPlanQual (which, in fact, is exactly
where we are according to the backtrace) then this code returns without
doing much, and in particular without setting the indexscan node's
cs_ExprContext->ecxt_outertuple from the outer plan's value.  Perhaps
the next three lines ought to happen before testing for the PlanQual
case, instead of after (Vadim, what do you think?).  But I don't
understand why having other backends running concurrently would affect
this.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: src/test/locale/de_DE.ISO-8859-1
Next
From: Tom Lane
Date:
Subject: Re: Crash on UPDATE in 7.0beta3