Re: libpq: Process buffered SSL read bytes to support records >8kB on async API

Jacob Champion <jacob.champion@enterprisedb.com>

From: Jacob Champion <jacob.champion@enterprisedb.com>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: Lars Kanis <lars@greiz-reinsdorf.de>, pgsql-hackers@lists.postgresql.org
Date: 2025-07-16T18:50:29Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Remove incorrect Assert.

On Wed, Jul 16, 2025 at 7:36 AM Merlin Moncure <mmoncure@gmail.com> wrote:
> 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.

Thanks for this! I'm not sure I'll be able to prove that this is
related, as opposed to some other potential problem, but it's good to
have the information.

--Jacob