Re: [HACKERS] Discussion on missing optimizations - Mailing list pgsql-hackers

From Andreas Seltenreich
Subject Re: [HACKERS] Discussion on missing optimizations
Date
Msg-id 87wp3nhzfl.fsf@ansel.ydns.eu
Whole thread Raw
In response to Re: [HACKERS] Discussion on missing optimizations  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Alvaro Herrera writes:

> Andres Freund wrote:
>> Unfortunately it won't help in this specific case (no support for UNION,
>> just UNION ALL), but I thought it might be interesting to reference
>> https://medium.com/@uwdb/introducing-cosette-527898504bd6
>> here.
>
> Interesting.  I thought about a completely different approach -- use a
> fuzzer, which runs each generated query on two servers, one patched one
> not, and compare the results.  Would it be possible to tweak sqlsmith to
> do this?

I think the tweaking needed would be:

1. Log successful queries as well along with a result description.  Maybe logging returned/affected rows is sufficent.

2. Make it avoid nondeterministic things such as joining  pg_stat_activity or calling non-immutable functions

The second one is a bit harder and I can't think of a more elegant
solution than adding a blacklisting/whitelisting feature and let the
user do the hard work…

If these are solved though, one could make multiple runs with the same
random seed and query the logging database for differences in the result
descriptions.

regards,
Andreas


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] [sqlsmith] Failed assertion in adjust_appendrel_attrs_mutator
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Useless(?) asymmetry in parse_func.c