Re: [HACKERS] possibility to specify template database for pg_regress - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: [HACKERS] possibility to specify template database for pg_regress
Date
Msg-id 7649e975-a5f5-0201-5bb0-4c2243d8352f@BlueTreble.com
Whole thread Raw
In response to Re: [HACKERS] possibility to specify template database for pg_regress  (Andres Freund <andres@anarazel.de>)
Responses Re: [HACKERS] possibility to specify template database for pg_regress  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On 2/14/17 1:59 PM, Andres Freund wrote:
>> AFAIK if you're doing make check (as opposed to installcheck) it's
>> significantly more complicated than that since you'd have to create a temp
>> cluster/install yourself.>
> But in that case you can't have useful templates in the regression test
> either, so the whole discussion is moot?

At that point it depends on what you're trying to do. Presumably 
separating cluster control would make it much easier to script 
createdb/dropdb as you suggested. Tom's use case might be more easily 
served by specifying a template database. I don't think Pavel ever 
posted his use case.

Speaking for myself, my normal pattern is to have a number of separate 
pg_regress suites, each of which ends up loading the extension under 
test. Loading a large extension can end up being very time consuming; 
enough so that I'd expect it to be much faster to create the temp 
cluster, load all the prereq's once in some template database, and then 
use that template for most/all of the tests. In that scenario separating 
cluster create/drop would certainly be useful, but the template option 
would probably be helpful as well (though since pg_regress' diff-based 
methodology just gets in my way I'd likely use some other harness to 
actually run the tests).
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: [HACKERS] Official adoption of PGXN
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] Parallel Index Scans