Re: possibility to specify template database for pg_regress

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: possibility to specify template database for pg_regress
Date: 2017-02-14 18:33:35
Message-ID: a251f4cc-2f6f-d111-ce6e-d8cae53e7e57@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2/13/17 8:50 PM, Andres Freund wrote:
> On 2017-02-14 11:46:52 +0900, Michael Paquier wrote:
>>> I still fail to see why --use-existing as suggested in
>>> https://www.postgresql.org/message-id/20170208002900.vkldujzfkwbvqqq7@alap3.anarazel.de
>>> isn't sufficient.
>>
>> Some tests create objects without removing them, meaning that
>> continuous runs would fail with only --use-existing. This patch brings
>> value in such cases.
>
> You can trivially script the CREATE/DROP DB outside with
> --use-existing. Which seems a lot more flexible than adding more and
> more options to pg_regress.

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.

As an extension author, I'd *love* to have the cluster management stuff
in pg_regress broken out: it's the only reason I use pg_regress, and
pg_regress's idea of what a test failure is just gets in my way. But
breaking that out is far more invasive than allowing a template database.
--
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)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2017-02-14 18:38:04 Re: Proposal: GetOldestXminExtend for ignoring arbitrary vacuum flags
Previous Message Robert Haas 2017-02-14 18:26:12 Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)