On Mon, Feb 13, 2017 at 9:04 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> I think the comment at that place is not as clear as it should be. So
> how about changing it as below:
>
> Existing comment:
> --------------------------
> /*
> * For parallel scans, get the last page scanned as it is quite
> * possible that by the time we try to fetch previous page, other
> * worker has also decided to scan that previous page. So we
> * can't rely on _bt_walk_left call.
> */
>
> Modified comment:
> --------------------------
> /*
> * For parallel scans, it is quite possible that by the time we try to fetch
> * the previous page, another worker has also decided to scan that
> * previous page. So to avoid that we need to get the last page scanned
> * from shared scan descriptor before calling _bt_walk_left.
> */
That sounds way better.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company