On 2024-07-18 Th 6:51 PM, Thomas Munro wrote:
On Wed, Jul 17, 2024 at 2:27 AM Andrew Dunstan <andrew@dunslane.net> wrote:
Here's the latest version of this patch. It removes all use of
background_psql(). Instead it uses libpq's async interface, which seems
to me far more robust. There is one remaining use of interactive_psql(),
but that's reasonable as it's used for testing psql itself.
This looks really nice! Works on my local FBSD machine.
cool
I pushed it to CI, and mostly saw environmental problems unrelated to
the patch, but you might be interested in the ASAN failure visible in
the cores section:
https://cirrus-ci.com/task/6607915962859520
Unfortunately I can't see the interesting log messages, because it
detected that the logs were still being appended to and declined to
upload them. I think that means there must be subprocesses not being
waited for somewhere?
I couldn't see anything obvious either.
I spent yesterday creating an XS wrapper for just the 19 libpq functions
used in Session.pm. It's pretty simple. I have it passing a very basic
test, but haven't tried plugging it into Session.pm yet.
Neat. I guess the libpq FFI/XS piece looks the same to the rest of
the test framework outside that module.
Yeah, that's the idea.
It does sound pretty
convenient if the patch just works™ on CI/BF without any environment
changes, which I assume must be doable because we already build XS
stuff in sr/pl/plperl. Looking forward to trying that version.
Still working on it. Meanwhile, here's a new version. It has some cleanup and also tries to use Session objects instead of psql in simple cases for safe_psql().
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com