Re: coverage increase for worker_spi

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-05-31T19:17:52Z
Lists: pgsql-hackers

Attachments

On 2019-May-30, Alvaro Herrera wrote:

> 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.

Another thing I noticed when fixing *this*, in turn, is that if you load
worker_spi in shared_preload_libraries then the contrib_regression
database doesn't exist by the point that runs, so those workers fail to
start.  The dynamic one does start in the configured database.
I guess we could just ignore the failures and just rely on the dynamic
worker.

I ended up with these two patches.  I'm not sure about pushing
separately.  It seems pointless to backport the "fix" to back branches
anyway.

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

Commits

  1. Increase test coverage for worker_spi by ∞%