Re: Bug in bttext_abbrev_convert()

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Kevin Grittner <kgrittn(at)ymail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: Bug in bttext_abbrev_convert()
Date: 2015-07-19 20:53:47
Message-ID: CAM3SWZTvMwmR8B=Do0AKJeJnj=WdcPbk7rw+YsYb07+w_=tdAg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jul 19, 2015 at 9:53 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> Perhaps this could be moved into a virtual machine hosted by the
> postgres project infrastructure?

I would definitely be willing to start an external project to provide
additional coverage tests if I thought someone was inclined to run
them in this kind of environment. There *is* a place for scattergun
tests that just exercise rarely hit codepaths (or even frequently hit
codepaths that are not tested by the regression tests currently, often
due to requiring non-trivial amounts of data). Running the tests with
tools like Valgrind will catch a certain class of bug, like the one
reported and fixed on this thread.

The advantage of an external project is that being a committer isn't
tied to being a Postgres committer, and that it allows us to have
broader requirements to run all the tests. For example, it would be
acceptable to write some tests in Perl, and others in Python,
according to individual preference. Or, individual scripts could have
requirements that are only practical to satisfy with a
language-specific package manager like Python's pip, which would never
fly with the standard regression tests. I can imagine that kind of
thing being useful for generating a test-case involving very large
hash joins or sorts, where a procedural generation of the tests is
easier than having hundreds of megabytes of dummy data stored in git.

Weren't early versions of isolationtester written in Python + Twisted?

Noah suggested that Valgrind be extended to detect when a buffer was
read from despite not being pinned. This seems like a good idea to me,
but unless and until we exercise the code paths where this might be
happening, which tend to involve complex issues with concurrency, then
we won't get the full benefit of automated detection. I recall
noticing such a bug when reviewing the B-Tree page split patch that
went into 9.4. But the relevant code path isn't exercised at all, and
so even if Valgrind could have detected it, it probably wouldn't have
(the P_INCOMPLETE_SPLIT() path within _bt_moveright() has no
coverage).

I think that a lot of us are doing stuff like this privately already
to some extent, but we don't know about it because it's never
submitted because the requirements are too high.

--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-07-19 20:56:20 Re: TABLESAMPLE patch is really in pretty sad shape
Previous Message Noah Misch 2015-07-19 20:32:16 Re: xlc 12.1 miscompiles 32-bit ginCompareItemPointers()