Re: Add PQsendSyncMessage() to libpq

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com>, Anton Kirilov <antonvkirilov(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Add PQsendSyncMessage() to libpq
Date: 2024-01-15 09:49:56
Message-ID: 202401150949.wq7ynlmqxphy@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 2024-Jan-15, Michael Paquier wrote:

Looks good! Just some small notes,

> +/*
> + * Wrapper for PQpipelineSync and PQsendPipelineSync.
> *
> * It's legal to start submitting more commands in the pipeline immediately,
> * without waiting for the results of the current pipeline. There's no need to

the new function pqPipelineSyncInternal is not a wrapper for these other
two functions -- the opposite is true actually. We tend to use the term
"workhorse" or "internal workhorse" for this kind of thing.

In the docs, after this patch we have

- PQpipelineSync
- PQsendFlushRequest
- PQsendPipelineSync

Wouldn't it make more sense to add the new function in the middle of the
two existing ones instead?

Looking again at the largish comment that's now atop
pqPipelineSyncInternal(), I think most of it should be removed -- these
things should be explained in the SGML docs, and I think they are, in
the "Using Pipeline Mode" section. We can just have the lines this
patch is adding.

Álvaro Herrera 48°01'N 7°57'E —
"I can't go to a restaurant and order food because I keep looking at the
fonts on the menu. Five minutes later I realize that it's also talking
about food" (Donald Knuth)

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2024-01-15 10:17:34 Re: System username in pg_stat_activity
Previous Message Andrei Lepikhov 2024-01-15 09:46:03 Re: POC: GROUP BY optimization