From: | Jelte Fennema-Nio <postgres(at)jeltef(dot)nl> |
---|---|
To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Make query cancellation keys longer |
Date: | 2024-03-03 17:27:56 |
Message-ID: | CAGECzQTjFAz=OErVJbH8kbdVze_rnXeufGSbNKw+mpzOEWe8cw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, 3 Mar 2024 at 15:27, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl> wrote:
> + case EOF:
> + /* We'll come back when there is more data */
> + return PGRES_POLLING_READING;
>
> Nice catch, I'll go steal this for my patchset which adds all the
> necessary changes to be able to do a protocol bump[1].
Actually, it turns out your change to return PGRES_POLLING_READING on
EOF is incorrect (afaict). A little bit above there is this code
comment above a check to see if the whole body was received:
* Can't process if message body isn't all here yet.
*
* After this check passes, any further EOF during parsing
* implies that the server sent a bad/truncated message.
* Reading more bytes won't help in that case, so don't return
* PGRES_POLLING_READING after this point.
So I'll leave my patchset as is.
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2024-03-03 17:40:32 | Re: Refactoring backend fork+exec code |
Previous Message | Joe Conway | 2024-03-03 15:57:04 | PostgreSQL Contributors Updates |