Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument
От
Peter Geoghegan
Тема
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument
Дата
Msg-id
CAH2-Wzn-EFddFairDVtJSopb4N5YwKO69E8F=iOW5V9for3srg@mail.gmail.com
Ответ на
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument (Peter Geoghegan)
Список
Дерево обсуждения
tuplesort_gettuple_common() and *should_free argument Peter Geoghegan <pg@heroku.com>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument Peter Geoghegan <pg@heroku.com>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument Michael Paquier <michael.paquier@gmail.com>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument David Steele <david@pgmasters.net>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument David Steele <david@pgmasters.net>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument Peter Geoghegan <pg@bowt.ie>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument Peter Geoghegan <pg@bowt.ie>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument Peter Geoghegan <pg@heroku.com>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument Peter Geoghegan <pg@heroku.com>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument Peter Geoghegan <pg@heroku.com>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument Peter Geoghegan <pg@heroku.com>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument Peter Geoghegan <pg@bowt.ie>
Re: tuplesort_gettuple_common() and *should_free argument Andres Freund <andres@anarazel.de>
Re: tuplesort_gettuple_common() and *should_free argument Peter Geoghegan <pg@bowt.ie>
Re: tuplesort_gettuple_common() and *should_free argument Anastasia Lubennikova <lubennikovaav@gmail.com>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument Andres Freund <andres@anarazel.de>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument Peter Geoghegan <pg@bowt.ie>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument Andres Freund <andres@anarazel.de>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument Peter Geoghegan <pg@bowt.ie>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument Peter Geoghegan <pg@bowt.ie>
Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument Andres Freund <andres@anarazel.de>
Re: tuplesort_gettuple_common() and *should_free argument David Steele <david@pgmasters.net>
Re: tuplesort_gettuple_common() and *should_free argument Heikki Linnakangas <hlinnaka@iki.fi>
Re: tuplesort_gettuple_common() and *should_free argument Peter Geoghegan <pg@heroku.com>
Re: tuplesort_gettuple_common() and *should_free argument Tom Lane <tgl@sss.pgh.pa.us>
On Wed, Jan 25, 2017 at 3:11 PM, Peter Geoghegan wrote: > On Wed, Jan 25, 2017 at 3:11 PM, Tom Lane wrote: >> Please. You might want to hit the existing ones with a separate patch, >> but it doesn't much matter; I'd be just as happy with a patch that did >> both things. > > Got it. Attached is a patch that does both things at once. The internal function tuplesort_gettuple_common() still mentions repeated fetches, since that context matters to its internal callers. The various external-facing functions have a simpler, stricter contract, as discussed. I didn't end up adding a line like "copy=FALSE is recommended only when the next tuplesort manipulation will be another tuplesort_gettupleslot fetch into the same slot", which you suggested. When the tuplesort state machine is in any state following "performing" a sort, there are very few remaining sane manipulations. Just things like skipping or seeking around for tuples, and actually ending the tuplesort and releasing resources. -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
В списке pgsql-hackers по дате отправления
От: Thomas Munro
Дата: