Re: Guidelines on dropping objects in regression tests, sqlsmith

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, seltenreich(at)gmx(dot)de
Subject: Re: Guidelines on dropping objects in regression tests, sqlsmith
Date: 2018-04-15 01:18:47
Message-ID: 29342.1523755127@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Geoghegan <pg(at)bowt(dot)ie> writes:
> Andreas Seltenreich's sqlsmith tool has found an impressive number of
> bugs.

Indeed.

> In light of that, it seems to me that it would be reasonable for
> a contributor to write a regression test that avoids dropping database
> objects specifically so that sqlsmith had some chance of finding bugs
> after the fact, by generating a query whose plan ends up accessing
> said objects.

Traditionally, we've left around instances of various sorts of objects
so that pg_dump/pg_upgrade would be exercised on those objects. It's
possible that sqlsmith has different needs in this area, but hard to
say without more thought.

In any case, I'd say that there's never been a scorched-earth policy
so far as leaving regression test objects behind is concerned --- with
the exception of objects visible outside the regression database, ie
roles or tablespaces. I wonder whether that restriction is problematic
from this standpoint.

> For example, the new index_including.sql file drops all
> INCLUDE indexes/tables proactively, even though it looks like they're
> rather small, and in a certain sense worth keeping around.

I agree that that's a completely bad idea, especially if nothing's
been done to ensure pg_dump test coverage for the feature otherwise.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2018-04-15 02:13:46 Re: Guidelines on dropping objects in regression tests, sqlsmith
Previous Message Peter Geoghegan 2018-04-15 00:50:27 Guidelines on dropping objects in regression tests, sqlsmith