On Sun, Feb 10, 2019 at 5:18 PM Tom Lane <t...@sss.pgh.pa.us> wrote: > Apparently, whoever went through indxpath.c to substitute nkeycolumns > for ncolumns was not paying attention. As far as I can tell, the > *only* place in there where it's correct to reference ncolumns is in > check_index_only, where we determine which columns can be extracted from > an index-only scan.
Ugh. Yeah, it's rather inconsistent. > I've got mixed feelings about whether to try to fix this before > tomorrow's wraps. The attached patch seems correct and passes > check-world, but there's sure not a lot of margin for error now. > Thoughts? I think that it should be fixed in the next point release if at all possible. The bug is a simple omission. I have a hard time imagining how your patch could possibly destabilize things, since nkeycolumns is already used in numerous other places in indxpath.c. -- Peter Geoghegan