Re: coverage increase for worker_spi

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: coverage increase for worker_spi
Date: 2019-05-30 14:22:15
Message-ID: 20190530142215.GA12101@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-May-29, Tom Lane wrote:

> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> > Tom pointed out that coverage for worker_spi is 0%. For a module that
> > only exists to provide coverage, that's pretty stupid. This patch
> > increases coverage to 90.9% line-wise and 100% function-wise, which
> > seems like a sufficient starting point.
>
> > How would people feel about me getting this in master at this point in
> > the cycle, it being just some test code? We can easily revert if
> > it seems too unstable.
>
> I'm not opposed to adding a new test case at this point in the cycle,
> but as written this one seems more or less guaranteed to fail under
> load.

True. Here's a version that should be more resilient.

One thing I noticed while writing it, though, is that worker_spi uses
the postgres database, instead of the contrib_regression database that
was created for it. And we create a schema and a table there. This is
going to get some eyebrows raised, I think, so I'll look into fixing
that as a bugfix before getting this commit in.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
v2-0001-Increase-coverage-for-worker_spi-by.patch text/x-diff 2.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message DEV_OPS 2019-05-30 15:07:30 Re: Zedstore - compressed in-core columnar storage
Previous Message Andres Freund 2019-05-30 14:18:21 Re: Server crash due to assertion failure in CheckOpSlotCompatibility()