Re: Re: Reusing abbreviated keys during second pass of ordered [set] aggregates
От
Peter Geoghegan
Тема
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates
Дата
Msg-id
CAM3SWZS3CvOaLF9rK01hnwNQRk0qMiJSu4suKQ1k7SdTpo7cfA@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Reusing abbreviated keys during second pass of ordered [set] aggregates Peter Geoghegan <pg@heroku.com>
Re: Reusing abbreviated keys during second pass of ordered [set]
aggregates Jeff Janes <jeff.janes@gmail.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Peter Geoghegan <pg@heroku.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Andreas Karlsson <andreas@proxel.se>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Peter Geoghegan <pg@heroku.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Robert Haas <robertmhaas@gmail.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Peter Geoghegan <pg@heroku.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Robert Haas <robertmhaas@gmail.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Peter Geoghegan <pg@heroku.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Peter Geoghegan <pg@heroku.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Robert Haas <robertmhaas@gmail.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Peter Geoghegan <pg@heroku.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Robert Haas <robertmhaas@gmail.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Peter Geoghegan <pg@heroku.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Robert Haas <robertmhaas@gmail.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Robert Haas <robertmhaas@gmail.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Peter Geoghegan <pg@heroku.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Peter Geoghegan <pg@heroku.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Robert Haas <robertmhaas@gmail.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Peter Geoghegan <pg@heroku.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Peter Geoghegan <pg@heroku.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Re: Reusing abbreviated keys during second pass of ordered [set] aggregates Tom Lane <tgl@sss.pgh.pa.us>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Michael Paquier <michael.paquier@gmail.com>
Commitfest Bug (was: Re: Reusing abbreviated keys during
second pass of ordered [set] aggregates) Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Commitfest Bug (was: Re: Reusing abbreviated keys
during second pass of ordered [set] aggregates) Pavel Stehule <pavel.stehule@gmail.com>
Re: Commitfest Bug (was: Re: Reusing abbreviated keys
during second pass of ordered [set] aggregates) Magnus Hagander <magnus@hagander.net>
Re: Commitfest Bug (was: Re: Reusing abbreviated keys
during second pass of ordered [set] aggregates) Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Commitfest Bug (was: Re: Reusing abbreviated keys during second pass of ordered [set] aggregates) Tom Lane <tgl@sss.pgh.pa.us>
Re: Commitfest Bug (was: Re: Reusing abbreviated keys
during second pass of ordered [set] aggregates) Magnus Hagander <magnus@hagander.net>
Re: Commitfest Bug (was: Re: Reusing abbreviated keys
during second pass of ordered [set] aggregates) Michael Paquier <michael.paquier@gmail.com>
Re: Commitfest Bug (was: Re: Reusing abbreviated keys
during second pass of ordered [set] aggregates) Magnus Hagander <magnus@hagander.net>
Re: Commitfest Bug (was: Re: Reusing abbreviated keys
during second pass of ordered [set] aggregates) Peter Geoghegan <pg@heroku.com>
Re: Commitfest Bug (was: Re: Reusing abbreviated keys
during second pass of ordered [set] aggregates) Peter Geoghegan <pg@heroku.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Peter Geoghegan <pg@heroku.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Peter Geoghegan <pg@heroku.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Peter Geoghegan <pg@heroku.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Peter Geoghegan <pg@heroku.com>
Re: Re: Reusing abbreviated keys during second pass of
ordered [set] aggregates Peter Geoghegan <pg@heroku.com>
Re: Reusing abbreviated keys during second pass of ordered
[set] aggregates Thomas Munro <thomas.munro@enterprisedb.com>
Re: Reusing abbreviated keys during second pass of ordered
[set] aggregates Peter Geoghegan <pg@heroku.com>
On Wed, Dec 16, 2015 at 12:04 PM, Peter Geoghegan wrote: >> What kind of state is that? Can't we define this in terms of what it >> is rather than how it gets that way? > > It's zeroed. > > I guess we can update everything, including existing comments, to reflect that. Attached revision updates both the main commit (the optimization), and the backpatch commit (updated the contract). Changes: * Changes commit intended for backpatch to 9.5 to use new "zeroed" terminology (not "void" representation). * Puts fix within mergerun() (for this patch) in the same backpatch commit. We might as well keep this consistent, even though the correctness of 9.5 does not actually hinge upon having this change -- there is zero risk of breaking something in 9.5, and avoiding backpatching this part can only lead to confusion in the future. * Some minor tweaks to tuplesort.c. Make sure that tuplesort_putdatum() zeroes datum1 directly for NULL values. Comment tweaks. * Add comment to the datum case, discussing restriction there. I was wrong when I said that the datum sort case currently tacitly acknowledges as possible/useful something that the revised SortSupport contract will forbid (I wrote that e-mail in haste). What I propose to make the SortSupport contract forbid here is abbreviated keys that are *themselves* pass-by-reference. It is true that today, we do not support pass-by-value types with abbreviated keys for the datum case only (such opclass support could be slightly useful for float8, for example -- int8 comparisons of an alternative representation might be decisively cheaper). But that existing restriction is entirely distinct to the new restriction I propose to create. It seems like this distinction should be pointed out in passing, which I've done. -- Peter Geoghegan
В списке pgsql-hackers по дате отправления