Re: Backporting BackgroundPsql - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Backporting BackgroundPsql
Date
Msg-id 1319634.1719325560@sss.pgh.pa.us
Whole thread Raw
In response to Re: Backporting BackgroundPsql  (Andres Freund <andres@anarazel.de>)
Responses Re: Backporting BackgroundPsql
Re: Backporting BackgroundPsql
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2024-06-25 13:26:23 +0300, Heikki Linnakangas wrote:
>> 1. Write the new test differently on backbranches. Before 664d757531, the
>> test needs to work a lot harder to use the background psql session, calling
>> pump() etc. That's doable, but as noted in the discussion that led to
>> 664d757531, it's laborious and error-prone.
>>
>> 2. Backport commit 664d757531. This might break out-of-tree perl tests that
>> use the background_psql() function. I don't know if any such tests exist,
>> and they would need to be changed for v17 anyway, so that seems acceptable.
>> Anyone aware of any extensions using the perl test modules?
>>
>> 3. Backport commit 664d757531, but keep the existing background_psql()
>> function unchanged. Add a different constructor to get the v17-style
>> BackgroundPsql session, something like "$node->background_psql_new()".

> Yes, I've wished for this a couple times. I think 2 or 3 would be reasonable.
> I think 1) often just leads to either tests not being written or being
> fragile...

I'd vote for (2).  (3) is just leaving a foot-gun for people to
hurt themselves with.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: add a new explain option including_query for include query string inside the json plan output
Next
From: Andres Freund
Date:
Subject: Re: PostgreSQL does not compile on macOS SDK 15.0