Re: Max size of a btree index entry - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Max size of a btree index entry
Date
Msg-id 17034.1153352354@sss.pgh.pa.us
Whole thread Raw
In response to Re: Max size of a btree index entry  ("Jim C. Nasby" <jnasby@pervasive.com>)
List pgsql-hackers
"Jim C. Nasby" <jnasby@pervasive.com> writes:
> Could you not just scan right and see what the first key was? Thought
> granted, that means there's a chance of a wasted page scan, but I think
> that'd be somewhat of a corner case, so it might not be bad.

No, because (a) that confuses the first key that happens to be on a page
with its keyspace boundary --- what happens when you need to delete that
data key? and (b) because of locking considerations, you don't want to
move right and then have to back up.  You'd have to hold lock on the
first page while reading in the second, which makes for a nontrivial
performance hit.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: How does the planner deal with multiple possible indexes?
Next
From: Tom Lane
Date:
Subject: Re: Freezing tuples on pages dirtied by vacuum