Re: libpq compression (part 2)

From: Andrey Borodin <amborodin86(at)gmail(dot)com>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Jacob Champion <jchampion(at)timescale(dot)com>, Daniil Zakhlystov <usernamedt(at)yandex-team(dot)ru>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Subject: Re: libpq compression (part 2)
Date: 2022-11-17 00:27:06
Message-ID: CAAhFRxj_MuHG3Hrn5SJah+dwGL22FZ1wSMCtZ=PNyfO1vMtb-w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 15, 2022 at 7:17 PM Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:
>

Also I've found one more TODO item for the patch. Currently in
fe-connect.c patch is doing buffer reset:
conn->inStart = conn->inCursor = conn->inEnd = 0;
This effectively consumes butes up tu current cursor. However, packet
inspection is continued. The patch works because in most cases
following code will issue re-read of message. Coincidentally.
/* Get the type of request. */
if (pqGetInt((int *) &areq, 4, conn))
{
/* We'll come back when there are more data */
return PGRES_POLLING_READING;
}

But I think we need a proper
goto keep_going;
to start from the beginning of the message.

Thank you!

Best regards, Andrey Borodin.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2022-11-17 00:34:36 Re: Standardizing how pg_waldump presents recovery conflict XID cutoffs
Previous Message Andres Freund 2022-11-17 00:25:21 Re: Standardizing how pg_waldump presents recovery conflict XID cutoffs