Re: libpq compression (part 2) - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: libpq compression (part 2)
Date
Msg-id CAAhFRxj_MuHG3Hrn5SJah+dwGL22FZ1wSMCtZ=PNyfO1vMtb-w@mail.gmail.com
Whole thread Raw
In response to Re: libpq compression (part 2)  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: libpq compression (part 2)
List pgsql-hackers
On Tue, Nov 15, 2022 at 7:17 PM Justin Pryzby <pryzby@telsasoft.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.



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Standardizing how pg_waldump presents recovery conflict XID cutoffs
Next
From: Peter Geoghegan
Date:
Subject: Re: Standardizing how pg_waldump presents recovery conflict XID cutoffs