Re: Synchronized scans - Mailing list pgsql-patches

From Tom Lane
Subject Re: Synchronized scans
Date
Msg-id 3029.1181416859@sss.pgh.pa.us
Whole thread Raw
In response to Re: Synchronized scans  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-patches
Gregory Stark <stark@enterprisedb.com> writes:
> "Tom Lane" <tgl@sss.pgh.pa.us> writes:
>> The vacuum-cost-limit issue may be sufficient reason to kill this idea;
>> not sure.

> We already have a much higher cost for blocks that cause i/o than
> blocks which don't. I think if we had zero cost for blocks which don't
> cause i/o it would basically work unless the sleep time was so large
> that the other scans managed to cycle through the entire ring in that
> time.

I'm unconvinced.  That could perhaps work as long as the vacuum process
never did any I/O, ie was always a follower and never the leader of the
syncscan pack.  But if lazy_heap_scan is faster than a regular seqscan,
as I suspect, then it'd frequently become the leader and have to do the
I/O.  A few iterations of that will cause it to hit the vacuum cost
sleep, and that will make it fall behind the pack (and probably out of
sync entirely, unless the sleep is really short).

            regards, tom lane

pgsql-patches by date:

Previous
From: Gregory Stark
Date:
Subject: Re: Synchronized scans
Next
From: Magnus Hagander
Date:
Subject: Re: Regression tests