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

Поиск
Список
Период
Сортировка
От Jacob Champion
Тема Re: libpq: Process buffered SSL read bytes to support records >8kB on async API
Дата
Msg-id CAOYmi+=kbb7pV7k7RfWUcFt=CArJmp1R+R1Xnb8UnZLwpFgOwA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: libpq: Process buffered SSL read bytes to support records >8kB on async API  (Jacob Champion <jacob.champion@enterprisedb.com>)
Список pgsql-hackers
On Tue, Jul 1, 2025 at 1:42 PM Jacob Champion
<jacob.champion@enterprisedb.com> wrote:
> I do
> not yet understand why this protection is not extended to
> GSS-encrypted connections.

After repurposing some of my test code for d98cefe11, I'm able to
reproduce the hang with gssencmode when the server uses a
smaller-than-standard (12k) send buffer. Same reproduction case as the
original (32006-byte DataRow, 806-byte DataRow, CommandComplete,
ReadyForQuery).

So a complete patch for this has to consider GSS as well.

> So, to fix this once and for all, do we have to make sure that
> pqReadData() always fully drains the SSL/GSS transport buffer instead
> of eagerly returning?

I'll work on proving that code paths other than PQconsumeInput() are
affected. If they are, I'll start a patch for pqReadData().

--Jacob



В списке pgsql-hackers по дате отправления: