public inbox for [email protected]  
help / color / mirror / Atom feed
From: Nathan Bossart <[email protected]>
To: Jelte Fennema-Nio <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Re: future of PQfn()
Date: Wed, 27 May 2026 13:23:04 -0500
Message-ID: <ahc2iM2KRMyOWBPS@nathan> (raw)
In-Reply-To: <[email protected]>
References: <ahXE28klgxIJXBLq@nathan>
	<[email protected]>

On Tue, May 26, 2026 at 11:36:49PM +0200, Jelte Fennema-Nio wrote:
> Could you share the simple LO test you were running here and/or rerun it
> with this patch applied? I'd love to know if the patch reduces the
> slowdown significantly, or if something else is the bottleneck.

The test is just:

    int main()
    {
        PCconn *conn = PQsetdb(NULL, NULL, NULL, NULL, "postgres");

        for (int i = 0; i < 1000000; i++)
            lo_create(conn, i);

        for (int i = 0; i < 1000000; i++)
            lo_unlink(conn, i);
    }

Before applying your patch -> 0.457 seconds (best of ~10)
After applying your patch  -> 0.444 seconds (best of ~10)

For reference, HEAD runs this test in 0.319 seconds.

I've attached my work-in-progress patches here, in case you're interested.
0001 switches the frontend LO interface to use prepared statements, and
0002 removes PQfn() entirely.  0003 applies on top of those two and
switches the frontend LO interface to use PQexecParams() instead.

-- 
nathan


view thread (18+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: future of PQfn()
  In-Reply-To: <ahc2iM2KRMyOWBPS@nathan>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox