From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Using LibPq in TAP tests via FFI |
Date: | 2024-07-19 20:08:42 |
Message-ID: | 9aa14421-4493-48ab-beba-509f39330469@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2024-07-18 Th 6:51 PM, Thomas Munro wrote:
> On Wed, Jul 17, 2024 at 2:27 AM Andrew Dunstan<andrew(at)dunslane(dot)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
Attachment | Content-Type | Size |
---|---|---|
pqffi-poc-5.patch | text/x-patch | 65.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Aleksander Alekseev | 2024-07-19 20:09:34 | Re: Build with LTO / -flto on macOS |
Previous Message | Robert Haas | 2024-07-19 20:03:34 | Re: Incremental backup from a streaming replication standby fails |