pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: should check interrupts in BuildRelationExtStatistics ?
Date: Fri, 1 Jul 2022 19:07:04 -0500
Message-ID: <20220702000704.GJ13040@telsasoft.com> (raw)
In-Reply-To: <154878.1656717551@sss.pgh.pa.us>
References: <20220509000108.GQ28830@telsasoft.com>
	<YniLBN/x8N97ZDzf@paquier.xyz>
	<3592964.1652067393@sss.pgh.pa.us>
	<CA+TgmoY=Q9C9n=P=e8gTqLFTLza89t-cz+X-16LPaxq2+=qY2g@mail.gmail.com>
	<20220603152837.GO29853@telsasoft.com>
	<20220605014233.GR29853@telsasoft.com>
	<Yp2rdhPtSHDJxPAd@paquier.xyz>
	<20220617222549.GI29853@telsasoft.com>
	<154878.1656717551@sss.pgh.pa.us>

On Fri, Jul 01, 2022 at 07:19:11PM -0400, Tom Lane wrote:
> I tried interrupting at a random point and then stepping, and
> look what I hit after just a couple of steps:

I'd come up with the trick of setting
  SET backtrace_functions='ProcessInterrupts';

> That, um, piqued my interest.  After a bit of digging,
> I modestly propose the attached.  I'm not sure if it's
> okay to back-patch this, because maybe someone out there
> is relying on qsort() to be incapable of throwing an error
> --- but it'd solve the problem at hand and a bunch of other
> issues of the same ilk.

Confirmed this fixes the 3 types of extended stats, at least for the example
cases I made.

If it's okay to backpatch, v14 seems adequate since the problem is more
prominent with expressional statistics (I'm sure that's why I hit it) ...
otherwise v15 would do.

-- 
Justin





view thread (20+ messages)  latest in thread

Message-ID: <20220702000704.GJ13040@telsasoft.com>
Permalink:  ../20220702000704.GJ13040@telsasoft.com/
Also on:    postgresql.org/message-id/20220702000704.GJ13040@telsasoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: pryzby@telsasoft.com, tgl@sss.pgh.pa.us, michael@paquier.xyz, robertmhaas@gmail.com, tomas.vondra@enterprisedb.com
  Subject: Re: should check interrupts in BuildRelationExtStatistics ?
  In-Reply-To: <20220702000704.GJ13040@telsasoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox