Re: BackgroundPsql swallowing errors on windows
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Dunstan <andrew@dunslane.net>, pgsql-hackers@postgresql.org, Noah Misch <noah@leadboat.com>
Date: 2025-02-14T18:52:19Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
tests: BackgroundPsql: Fix potential for lost errors on windows
- bb2bf22761e1 13.21 landed
- c21ebcca7965 14.18 landed
- 70b650d18553 15.13 landed
- 4c9397c374d9 16.9 landed
- f61769adaa62 17.5 landed
- 8b886a4e3488 18.0 landed
-
Improve handling of empty query results in BackgroundPsql::query()
- 70291a3c66ec 18.0 cited
-
Extend Cluster.pm's background_psql() to be able to start asynchronously
- ba08edb06545 18.0 cited
Hi, On 2025-02-14 12:14:55 -0500, Tom Lane wrote: > Andres Freund <andres@anarazel.de> writes: > > On 2025-02-14 08:14:45 -0500, Andrew Dunstan wrote: > >> ... If there is interest I will > >> bring the work up to date, and maybe we can introduce this early in the v19 > >> cycle. It would significantly reduce our dependency on IPC::Run, especially > >> the pump() stuff. > > > I definitely am interested. > > +1. Would there be a chance of removing our use of IPC::Run entirely? > There'd be a lot to like about that. Unfortunately I doubt it'd get us that close to that. We do have several tests that intentionally involve psql, e.g. 010_tab_completion.pl, 001_password.pl. Presumably those would continue to use something like BackgroundPsql.pm, even if we had a sane way to have longrunning connections in tap tests. There also are a bunch of things we use IPC::Run to run synchronously, we probably could replace most of those without too much pain. The hardest probably would be timeout handling. Greetings, Andres Freund