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

From: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Lars Kanis <lars(at)greiz-reinsdorf(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: libpq: Process buffered SSL read bytes to support records >8kB on async API
Date: 2025-07-16 18:50:29
Message-ID: CAOYmi+m4Xv0Ubq3qCinEe_wyUCwRc-c3P=gPC9mqeKcFWfsXXA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 16, 2025 at 7:36 AM Merlin Moncure <mmoncure(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2025-07-16 18:50:46 Re: libpq: Process buffered SSL read bytes to support records >8kB on async API
Previous Message Dean Rasheed 2025-07-16 18:45:05 Re: small fix for pg_overexplain docs