Re: Parallel Seq Scan

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Robert Haas <robertmhaas(at)gmail(dot)com>, Fabrízio Mello <fabriziomello(at)gmail(dot)com>, Thom Brown <thom(at)linux(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parallel Seq Scan
Date: 2015-01-21 11:01:12
Message-ID: CA+HiwqFoN+nNxZWj=Nw3mLzUoW3WnLdKxYX52HT2t_vJ1ZUunQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday, January 21, 2015, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:

> On Wed, Jan 21, 2015 at 12:47 PM, Amit Langote <
> Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp
> <javascript:_e(%7B%7D,'cvml','Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp');>> wrote:
> >
> > On 20-01-2015 PM 11:29, Amit Kapila wrote:
> > > Note - I have yet to handle the new node types introduced at some
> > > of the places and need to verify prepared queries and some other
> > > things, however I think it will be good if I can get some feedback
> > > at current stage.
> > >
> >
> > I got an assertion failure:
> >
> > In src/backend/executor/execTuples.c: ExecStoreTuple()
> >
> > /* passing shouldFree=true for a tuple on a disk page is not sane */
> > Assert(BufferIsValid(buffer) ? (!shouldFree) : true);
> >
>
> Good Catch!
> The reason is that while master backend is scanning from a heap
> page, if it finds another tuple/tuples's from shared memory message
> queue it will process those tuples first and in such a scenario, the scan
> descriptor will still have reference to buffer which it is using from
> scanning
> from heap. Your proposed fix will work.
>
> > After fixing this, the assertion failure seems to be gone though I
> > observed the blocked (CPU maxed out) state as reported elsewhere by Thom
> > Brown.
> >
>
> Does it happen only when parallel_seqscan_degree > max_worker_processes?
>

I have max_worker_processes set to the default of 8 while
parallel_seqscan_degree is 4. So, this may be a case different from Thom's.

Thanks,
Amit

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Arne Scheffer 2015-01-21 12:18:04 Re: Add min and max execute statement time in pg_stat_statement
Previous Message Amit Kapila 2015-01-21 10:44:40 Re: Parallel Seq Scan