Re: Synchronized scans

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Synchronized scans
Date: 2007-06-08 18:57:09
Message-ID: 1181329029.7660.201.camel@dogma.v10.wvs
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On Fri, 2007-06-08 at 14:36 -0400, Tom Lane wrote:
> Heikki Linnakangas <heikki(at)enterprisedb(dot)com> writes:
> > Here's an update of the patch. I reverted the behavior at end of scan
> > back to the way it was in Jeff's original patch, and disabled reporting
> > the position when moving backwards.
>
> Applied with minor editorializations --- notably, I got rid of the
> HeapScanDesc dependency in syncscan.c's API, so that it could be used
> in other contexts (VACUUM, anyone?). There were a few glitches in the
> heapam.c code too.

I think VACUUM would be an ideal place for it. I assume we don't want to
make a change like that before 8.3 though, right?

> This would be a trivial addition to the code-as-committed (clear
> rs_syncscan upon backing up by a page) but I didn't add it. Any
> strong feelings one way or the other? AFAIK the only case where
> it'd happen is if someone reads forwards in a large-seqscan cursor
> for awhile and then reads backwards. You could argue that doing
> that is a good reason to drop them out of the syncscan pack ...
>

I don't feel strongly about it at all. Mostly because it seems so rare
that it would matter.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2007-06-08 20:10:08 Re: Minor changes to Recovery related code
Previous Message Tom Lane 2007-06-08 18:41:55 Re: Synchronized scans