On 2023-10-18 We 11:47, Tom Lane wrote:
Robert Haas <robertmh...@gmail.com> writes:
On Wed, Oct 18, 2023 at 10:28 AM Tom Lane <t...@sss.pgh.pa.us> wrote:
I did a bit of research on this on my favorite platforms, and did
not like the results:
Hmm. That's unfortunate. Is perl -MCPAN -e 'install Platypus::FFI' a
viable alternative?
Probably, see my followup.

                        


Interesting. OK, here's an attempt to push the cart a bit further down the road. The attached module wraps quite a lot of libpq, at least enough for most of the cases we would be interested in, I think. It also exports some constants such as connection status values, query status values, transaction status values and type Oids. It also makes the absence of FFI::Platypus not instantly fatal, but any attempt to use one of the wrapped functions will die with a message about the module being missing if it's not found.

I guess the next step would be for someone to locate some of the hotspots in the TAP tests and try to convert them to using persistent connections with this gadget or similar and see how much faster we can make them.


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com

Attachment: PqFFI.pm
Description: Perl program

Reply via email to