pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: daniele.varrazzo@gmail.com
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Using PQexecQuery in pipeline mode produces unexpected Close messages
Date: Wed, 15 Jun 2022 14:56:42 -0400
Message-ID: <532816.1655319402@sss.pgh.pa.us> (raw)
In-Reply-To: <20220615182633.ztcoloh7xbicggot@alvherre.pgsql>
References: <20220615182633.ztcoloh7xbicggot@alvherre.pgsql>

Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> So, git archaeology led me to this thread
> https://postgr.es/m/202106072107.d4i55hdscxqj@alvherre.pgsql
> which is why we added that message in the first place.

Um.  Good thing you looked.  I doubt we want to revert that change now.

> Alternatives:
> - Have the client not complain if it gets CloseComplete in idle state.
>   (After all, it's a pretty useless message, since we already do nothing
>   with it if we get it in BUSY state.)

ISTM the actual problem here is that we're reverting to IDLE state too
soon.  I didn't try to trace down exactly where that's happening, but
I notice that in the non-pipeline case we don't go to IDLE till we've
seen 'Z' (Sync).  Something in the pipeline logic must be jumping the
gun on that state transition.

			regards, tom lane





view thread (23+ messages)  latest in thread

Message-ID: <532816.1655319402@sss.pgh.pa.us>
Permalink:  ../532816.1655319402@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/532816.1655319402@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, horikyota.ntt@gmail.com, daniele.varrazzo@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Using PQexecQuery in pipeline mode produces unexpected Close messages
  In-Reply-To: <532816.1655319402@sss.pgh.pa.us>

* 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