Re: libpq: Process buffered SSL read bytes to support records >8kB on async API - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: libpq: Process buffered SSL read bytes to support records >8kB on async API
Date
Msg-id CAHyXU0yB7w_ZffGAmN2eCRWGS=jzfqBWP2eYukf0MnUO113kzg@mail.gmail.com
Whole thread Raw
In response to Re: libpq: Process buffered SSL read bytes to support records >8kB on async API  (Jacob Champion <jacob.champion@enterprisedb.com>)
Responses Re: libpq: Process buffered SSL read bytes to support records >8kB on async API
List pgsql-hackers
On Tue, Jul 15, 2025 at 4:31 PM Jacob Champion <jacob.champion@enterprisedb.com> wrote
Otherwise I think we'll continue to chase weird corner cases.

Agreed. Here's a little more detail on the case I noticed:

* postgres backend thread managing several libpq connections, with polling is_busy loop
* when client pushed a lot of log messages (say, with 'RAISE NOTICE'), the server would stall for significant periods of time, sometimes minutes -- during that time, there would be no activity in the log (the server doesn't do anything interesting outside of of the polling loop)
* checking backend server log, which relogs the client raised logs via dblink, each pause happened after roughly 16k bytes 
* reducing the log verbosity made the problem go away.

merlin

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: index prefetching
Next
From: Tomas Vondra
Date:
Subject: Re: index prefetching