Re: should check interrupts in BuildRelationExtStatistics ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: should check interrupts in BuildRelationExtStatistics ?
Date: 2022-07-07 19:50:51
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> On Wed, Jul 6, 2022 at 11:37 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> qsort_interruptible

> +1

So here's a patch that does it that way. I first meant to put the
new file into src/port/, but after remembering that that directory
has no backend-only functions, I went with src/backend/utils/sort/

For the moment I contented myself with changing qsort[_arg] calls
that occur during statistics collection. We have a lot more of course,
but many of them can be expected to not be dealing with much data,
and in some cases we might want some closer analysis to be sure there's
no performance hit. So I'm inclined to not worry too much about the
remaining qsort calls until somebody complains.

This could be back-patched to v14 without much worry, I should think.

regards, tom lane

Attachment Content-Type Size
check-for-interrupts-in-statistics-qsorts.patch text/x-diff 16.5 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2022-07-07 19:56:10 Re: Patch proposal: New hooks in the connection path
Previous Message Joe Conway 2022-07-07 19:43:03 Re: pg_parameter_aclcheck() and trusted extensions