Add a bound check to TidRangeEval - Mailing list pgsql-hackers

From Junwang Zhao
Subject Add a bound check to TidRangeEval
Date
Msg-id CAEG8a3KUbUUqQgfK5X8Sj-+ppPtGNTU+Ziep0Rxr7SLjoR+B6w@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hi hackers,

The comments of TidRangeEval saids:

```
Returns false if we detect the range cannot contain any tuples.
```

After narrowing the upper and lower bounds, we can add an
additional check to verify if the lower bound exceeds the
upper bound. If true, return false to avoid unnecessary calls
to table_beginscan_tidrange.

PFA the trivial patch.

-- 
Regards
Junwang Zhao

Attachment

pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: pgsql: postgres_fdw: Inherit the local transaction's access/deferrable
Next
From: Junwang Zhao
Date:
Subject: Re: Support tid range scan in parallel?