Re: Using PQexecQuery in pipeline mode produces unexpected Close messages

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: alvherre(at)alvh(dot)no-ip(dot)org
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, daniele(dot)varrazzo(at)gmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Using PQexecQuery in pipeline mode produces unexpected Close messages
Date: 2022-07-06 01:05:04
Message-ID: 20220706.100504.2043863610232270438.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

At Mon, 4 Jul 2022 10:49:33 +0200, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote in
> > Mmm. My patch moves the point of failure of the scenario a bit but
> > still a little short. However, as my understanding, it seems like the
> > task of the PQpipelineSync()-PQgetResult() pair to consume the
> > CloseComplete. If Iinserted PQpipelineSync() just after PQsendQuery()
> > and called PQgetResult() for PGRES_PIPELINE_SYNC before
> > PQexitPipelineMode(), the out-of-sync CloseComplete is not seen in the
> > scenario. But if it is right, I'd like to complain about the
> > obscure-but-stiff protocol of pipleline mode..
>
> Yeah, if you introduce PQpipelineSync then I think it'll work okay, but
> my point here was to make it work without requiring that; that's why I
> wrote the test to use PQsendFlushRequest instead.

A bit too late, but it is good to make state-transition simpler.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2022-07-06 01:50:10 Re: pg_upgrade (12->14) fails on aggregate
Previous Message Tom Lane 2022-07-05 22:32:22 Re: BUG #17539: Assert after CREATE OPERATOR CLASS command

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2022-07-06 01:25:02 Re: Issue with pg_stat_subscription_stats
Previous Message Michael Paquier 2022-07-06 01:02:29 Re: Logging query parmeters in auto_explain