- Notifications
You must be signed in to change notification settings - Fork5
Commit930fd68
committed
Revert the GinMaxItemSize calculation so that we fit 3 tuples per page.
Commit36a35c5 changed the divisor from 3 to 6, for no apparent reason.Reducing GinMaxItemSize like that created a dump/reload hazard: loading a9.3 database to 9.4 might fail with "index row size XXX exceeds maximum 1352for index ..." error. Revert the change.While we're at it, make the calculation slightly more accurate. It used todivide the available space on page by three, then subtractsizeof(ItemIdData), and finally round down. That's not totally accurate; theitem pointers for the three items are packed tight right after the pageheader, but there is alignment padding after the item pointers. Change thecalculation to reflect that, like BTMaxItemSize does. I tested this withdifferent block sizes on systems with 4- and 8-byte alignment, and the valueafter the final MAXALIGN_DOWN was the same with both methods on allconfigurations. So this does not make any difference currently, but let's betidy.Also add a comment explaining what the macro does.This fixes bug #12292 reported by Robert Thaler. Backpatch to 9.4, where thebug was introduced.1 parent3b5a89c commit930fd68
1 file changed
+10
-2
lines changedLines changed: 10 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
226 | 226 |
| |
227 | 227 |
| |
228 | 228 |
| |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
229 | 236 |
| |
230 | 237 |
| |
231 |
| - | |
232 |
| - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
233 | 241 |
| |
234 | 242 |
| |
235 | 243 |
| |
|
0 commit comments
Comments
(0)