Re: pg_partition_tree crashes for a non-defined relation

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Postgres hackers <pgsql-hackers(at)postgresql(dot)org>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: pg_partition_tree crashes for a non-defined relation
Date: 2018-12-09 17:48:15
Message-ID: 20181209174815.GD3415@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greetings,

* Michael Paquier (michael(at)paquier(dot)xyz) wrote:
> On Sat, Dec 08, 2018 at 08:46:08AM -0500, Stephen Frost wrote:
> > I wonder if we maybe should have a regression test for every such
> > function which just queries the catalog in a way to force the function
> > to be called for every relation defined in the regression tests, to
> > ensure that it doesn't segfault or throw an error..
>
> Like sqlsmith? It looks hard to me to make something like that part of
> the main regression test suite, as that's going to be costly and hard to
> scale with.

No, I mean something like:

with x as (select pg_partition_tree(relname) from pg_class)
select 1 from x limit 1;

or whatever it takes to make sure that the function is run against every
entry in pg_class (or whatever is appropriate) while not returning the
results (since we don't actually care about the output, we just want to
make sure it doesn't ERROR or crash).

sqlsmith, as I recall, doesn't care about ERROR cases, it's just looking
for crashes, so it's not quite the same thing.

Thanks!

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2018-12-09 17:49:18 Re: pg_partition_tree crashes for a non-defined relation
Previous Message Amit Langote 2018-12-09 15:57:39 Re: slight tweaks to documentation about runtime pruning