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-31 19:17:52
Message-ID: 20190531191752.GA7467@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
v3-0001-worker-spi-database-fix.patch text/x-diff 1.2 KB
v3-0002-Increase-coverage-for-worker_spi-by.patch text/x-diff 3.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message James Coleman 2019-05-31 19:51:57 Re: [PATCH] Incremental sort (was: PoC: Partial sort)
Previous Message David Rowley 2019-05-31 19:06:01 Re: using index or check in ALTER TABLE SET NOT NULL