Re: [HACKERS] putting CHECK_FOR_INTERRUPTS in

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Charles Duffy <charles(dot)duffy(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] putting CHECK_FOR_INTERRUPTS in
Date: 2006-07-30 01:48:30
Message-ID: 200607300148.k6U1mUN00127@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Are we done with the sort interrupt issue mentioned in the subject line,
> > and the issue outlined below?
>
> I'm inclined not to apply the proposed patch (adding
> CHECK_FOR_INTERRUPTS) because of the risk of memory leakage inside
> qsort. OTOH you could argue that there's an unfixable risk of memory
> leakage there anyway, because it's always possible that the invoked
> datatype comparison routine exits with elog(ERROR) for some reason,
> or even contains a CHECK_FOR_INTERRUPTS call itself. Comments?

OK, we do check somewhere during sorting, I assume. I can't imagine a
single qsort() call taking all that long because we do them in batches
anyway.

> As for the question of whether we should try to detoast sort keys before
> sorting, I'd suggest adding that to TODO. Investigating whether this
> would be a good idea will take more time than we have for 8.2, so it's
> gonna have to wait for a future cycle.

Added to TODO:

* Consider detoasting keys before sorting

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-07-30 01:50:03 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES] 8.2 features?)
Previous Message Joe Conway 2006-07-30 01:45:44 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-07-30 01:50:03 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES] 8.2 features?)
Previous Message Joe Conway 2006-07-30 01:45:44 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]