Re: Heap's backwards scan scans the incorrect pages with heap_setscanlimits()

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: Heap's backwards scan scans the incorrect pages with heap_setscanlimits()
Date: 2021-01-25 07:05:19
Message-ID: CAApHDvpP9RAFz3bmgS_kTnmbADBm=JWT5jG4LTsenZ=XXVzVUA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 21 Jan 2021 at 13:16, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> Proposed patch attached.

I ended up pushing a slightly revised version of this which kept the
code the same as before when rs_numblocks had not been changed. I
backpatched to 9.5 as it seemed low risk and worthy of stopping some
head-scratching and a future report for any extension authors that
make use of heap_setscanlimits() with backwards scans at some point in
the future.

David

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message tsunakawa.takay@fujitsu.com 2021-01-25 07:12:56 RE: libpq debug log
Previous Message Joel Jacobson 2021-01-25 07:04:34 The mysterious pg_proc.protrftypes