Re: pgsql: Fix theoretical bug in tuplesort

2021-07-12 Thread David Rowley
On Tue, 13 Jul 2021 at 12:42, Tom Lane wrote: > > ... btw, wouldn't it be advisable to set stup->tuple to NULL > after dropping the referenced storage? I think that's probably a good idea. I'll adjust that now... David

pgsql: Fix theoretical bug in tuplesort

2021-07-12 Thread David Rowley
Fix theoretical bug in tuplesort This fixes a theoretical bug in tuplesort.c which, if a bounded sort was used in combination with a byval Datum sort (tuplesort_begin_datum), when switching the sort to a bounded heap in make_bounded_heap(), we'd call free_sort_tuple(). The problem was that when s

pgsql: Fix theoretical bug in tuplesort

2021-07-12 Thread David Rowley
Fix theoretical bug in tuplesort This fixes a theoretical bug in tuplesort.c which, if a bounded sort was used in combination with a byval Datum sort (tuplesort_begin_datum), when switching the sort to a bounded heap in make_bounded_heap(), we'd call free_sort_tuple(). The problem was that when s

pgsql: Fix theoretical bug in tuplesort

2021-07-12 Thread David Rowley
Fix theoretical bug in tuplesort This fixes a theoretical bug in tuplesort.c which, if a bounded sort was used in combination with a byval Datum sort (tuplesort_begin_datum), when switching the sort to a bounded heap in make_bounded_heap(), we'd call free_sort_tuple(). The problem was that when s

pgsql: Fix theoretical bug in tuplesort

2021-07-12 Thread David Rowley
Fix theoretical bug in tuplesort This fixes a theoretical bug in tuplesort.c which, if a bounded sort was used in combination with a byval Datum sort (tuplesort_begin_datum), when switching the sort to a bounded heap in make_bounded_heap(), we'd call free_sort_tuple(). The problem was that when s

pgsql: Fix theoretical bug in tuplesort

2021-07-12 Thread David Rowley
Fix theoretical bug in tuplesort This fixes a theoretical bug in tuplesort.c which, if a bounded sort was used in combination with a byval Datum sort (tuplesort_begin_datum), when switching the sort to a bounded heap in make_bounded_heap(), we'd call free_sort_tuple(). The problem was that when s

Re: pgsql: Fix theoretical bug in tuplesort

2021-07-12 Thread Tom Lane
... btw, wouldn't it be advisable to set stup->tuple to NULL after dropping the referenced storage? regards, tom lane

pgsql: Fix theoretical bug in tuplesort

2021-07-12 Thread David Rowley
Fix theoretical bug in tuplesort This fixes a theoretical bug in tuplesort.c which, if a bounded sort was used in combination with a byval Datum sort (tuplesort_begin_datum), when switching the sort to a bounded heap in make_bounded_heap(), we'd call free_sort_tuple(). The problem was that when s

pgsql: Fix theoretical bug in tuplesort

2021-07-12 Thread David Rowley
Fix theoretical bug in tuplesort This fixes a theoretical bug in tuplesort.c which, if a bounded sort was used in combination with a byval Datum sort (tuplesort_begin_datum), when switching the sort to a bounded heap in make_bounded_heap(), we'd call free_sort_tuple(). The problem was that when s