pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Ivan Trofimov <i.trofimow@yandex.ru>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: libpq: pipeline mode might desynchronize client and server
Date: Fri, 24 Nov 2023 11:49:21 +0900
Message-ID: <ZWAPMRqhifJ8YVNW@paquier.xyz> (raw)
In-Reply-To: <1efe6f16-30f1-8dd2-7d5a-a6acc4203cc1@yandex.ru>
References: <1efe6f16-30f1-8dd2-7d5a-a6acc4203cc1@yandex.ru>

On Wed, Nov 22, 2023 at 03:13:46AM +0300, Ivan Trofimov wrote:
> This is a follow up on
> https://www.postgresql.org/message-id/17948-fcace7557e449957@postgresql.org.

Is this the same bug as discussed on this other thread?  Why is there
a need for a second thread?

> Libpq in pipeline mode considers '< 2TDCEZ' a sufficient response to
> '> BDESS', when according to specification one more 'Z' is expected.
> This leads to client <-> server desynchronization, when libpq parses the
> very next message server sends (which is Z, as expected).
> 
> A bit more context and a MRE:
> https://github.com/itrofimow/libpq_protocol_desync
> 
> I'm pretty sure that this branch https://github.com/postgres/postgres/blob/3af101ce8be8eeb0e8adc61e293b5d12989f68be/src/interfaces/li...
> should be adjusted to handle the case and do not match error response
> against sync query.

Could you attach the test case to the original thread please (assuming
that this is the same problem)?  If this data is deleted by github,
then any data making a problem reproducible would be lost.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (3+ messages)  latest in thread

Message-ID: <ZWAPMRqhifJ8YVNW@paquier.xyz>
Permalink:  ../ZWAPMRqhifJ8YVNW@paquier.xyz/
Also on:    postgresql.org/message-id/ZWAPMRqhifJ8YVNW@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, i.trofimow@yandex.ru, pgsql-bugs@lists.postgresql.org
  Subject: Re: libpq: pipeline mode might desynchronize client and server
  In-Reply-To: <ZWAPMRqhifJ8YVNW@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox