Re: should check interrupts in BuildRelationExtStatistics ?
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Justin Pryzby <pryzby@telsasoft.com>, Robert Haas <robertmhaas@gmail.com>, Tomas Vondra <tomas.vondra@enterprisedb.com>, pgsql-hackers@postgresql.org
Date: 2022-07-05T23:49:46Z
Lists: pgsql-hackers
On Tue, Jul 05, 2022 at 07:37:03PM -0400, Tom Lane wrote: > Nonetheless, it'd be a good idea to use an interruptible sort in > as many places as we can. If we don't mind YA copy of the qsort > code, I'd be inclined to propose inventing qsort_interruptible > which is like qsort_arg but also does CHECK_FOR_INTERRUPTS. > (There seems no reason to support a non-arg version, since you > can just pass NULL.) Or we could redefine qsort_arg as allowing > interrupts, but that might still carry some surprises for existing > code. Agreed to use a new and different API for this purpose. It seems like a tool where one could write some new code and use an interruptible qsort() thinking that it is fine, still a preperly-documented API has clear benefits. -- Michael
Commits
-
Invent qsort_interruptible().
- e64cdab00302 16.0 landed
- af72b0889441 14.5 landed
- 12c99c88442d 15.0 landed