Re: Pipeline mode and PQpipelineSync()

Boris Kolpackov <boris@codesynthesis.com>

From: Boris Kolpackov <boris@codesynthesis.com>
To: Alvaro Herrera <alvaro.herrera@2ndquadrant.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2021-06-28T12:56:43Z
Lists: pgsql-hackers
Alvaro Herrera <alvaro.herrera@2ndquadrant.com> writes:

> I forgot to mention:
> 
> > +	/* XXX useless without a flush ...? */
> > +	pqFlush(conn);
> > +
> > +	return 1;
> > +}
> 
> I'm not sure if it's a good idea for PQrequestFlush to itself flush
> libpq's buffer.  We can just document that PQflush is required ...
> opinions?

Yes, I think not calling PQflush() gives more flexibility. For example,
an application may "insert" them periodically after a certain number of
queries but call PQflush() at different intervals.



Commits

  1. libpq: Fix sending queries in pipeline aborted state

  2. Fix libpq state machine in pipeline mode

  3. Add PQsendFlushRequest to libpq