Re: PATCH: Batch/pipelining support for libpq - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: PATCH: Batch/pipelining support for libpq
Date
Msg-id 20210216231350.GA1629@alvherre.pgsql
Whole thread Raw
In response to Re: PATCH: Batch/pipelining support for libpq  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: PATCH: Batch/pipelining support for libpq  (Zhihong Yu <zyu@yugabyte.com>)
List pgsql-hackers
Here's a new version, where I've renamed everything to "pipeline".  I
think the docs could use some additional tweaks now in order to make a
coherent story on pipeline mode, how it can be used in a batched
fashion, etc.

Here's the renames I applied.  It's mostly mechanical, except
PQbatchSendQueue is now PQsendPipeline:

    PQBatchStatus -> PGpipelineStatus (enum)
    PQBATCH_MODE_OFF -> PQ_PIPELINE_OFF
    PQBATCH_MODE_ON -> PQ_PIPELINE_ON
    PQBATCH_MODE_ABORTED -> PQ_PIPELINE_ABORTED
    PQbatchStatus -> PQpipelineStatus (function)
    PQenterBatchMode -> PQenterPipelineMode
    PQexitBatchMode -> PQexitPipelineMode
    PQbatchSendQueue -> PQsendPipeline
    PGRES_BATCH_END -> PGRES_PIPELINE_END
    PGRES_BATCH_ABORTED -> PGRES_PIPELINE_ABORTED

Also, PQbatchStatus(conn) returns enum PGpipelineStatus (it previously
returned int).

I'm tempted to rename PGASYNC_QUEUED to PGASYNC_PIPELINE_IDLE (not sure
if PGASYNC_PIPELINE_READY fits better with the existing one).


In pgbench, I changed the metacommands to be \startpipeline and
\endpipeline.  There's a failing Assert() there which I commented out;
needs fixed.

-- 
Álvaro Herrera                            39°49'30"S 73°17'W

Attachment

pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: SSL SNI
Next
From: Zhihong Yu
Date:
Subject: Re: PATCH: Batch/pipelining support for libpq