Re: pg_partition_tree crashes for a non-defined relation - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: pg_partition_tree crashes for a non-defined relation
Date
Msg-id 20181209174815.GD3415@tamriel.snowman.net
Whole thread Raw
In response to Re: pg_partition_tree crashes for a non-defined relation  (Michael Paquier <michael@paquier.xyz>)
Responses Re: pg_partition_tree crashes for a non-defined relation
List pgsql-hackers
Greetings,

* Michael Paquier (michael@paquier.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

Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: slight tweaks to documentation about runtime pruning
Next
From: Stephen Frost
Date:
Subject: Re: pg_partition_tree crashes for a non-defined relation