Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tGHQW-001y6V-CI for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Nov 2024 12:45:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tGHQT-00ELzd-Aq for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Nov 2024 12:45:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tGHQS-00ELz0-SS for pgsql-hackers@lists.postgresql.org; Wed, 27 Nov 2024 12:45:48 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tGHQQ-004JwA-3O for pgsql-hackers@postgresql.org; Wed, 27 Nov 2024 12:45:48 +0000 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-53ddb99e9dcso4369644e87.3 for ; Wed, 27 Nov 2024 04:45:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeltef.nl; s=google; t=1732711544; x=1733316344; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=laop9Z264g4ZQXzADkQKXnQBFWg0N6L3gu/7Nz8fXPw=; b=CziVPunownLJWoKNuUtxLIVrAFG34Q2++czz+cLfJk8pkTd37tfm3K6LnqaCaajnBW jPP/BoWcWMYJNx8iDUsYCYcQCdfXC3DVET6+73DT+EkeiBw38agwzi3LouIUdBKHiPl5 iMaIZf2nF6SG6aM4dtMJ93J+6ub/u7XZF8LZIwioOI06lhd3+DG9HextQqILN96ufLHx yLcXEU9EpxAy1FyyF/+zXz5Lp9XqEF7MpFP+TSZjMrO2/vUU36WjI27KmEl84GFfltfl rbHyKwUgZhrAsLohuM47eMYNW6DPCMMxFCiPw5N6esZJJWBspV23hw4EthEMvaMwXKdI RsAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732711544; x=1733316344; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=laop9Z264g4ZQXzADkQKXnQBFWg0N6L3gu/7Nz8fXPw=; b=Qig5gOvtpCJDaHMdefXtSKVV1KmnEHrnMoc19+H7GpHFn/FBcvvfCrKZtkOcoBegq+ VScnQzc6bVqA+T6U6Iq5LdNobQVlmCfX4d/M1srD/dYMgBIBIVt33DWBX2M6+/qJwXno sZ3rbvNNBizKE+db9NQDxsuNMk8JxTEUD4VaEZPvdjtr2gXY6EBrtBfn6yN2ukTPMVzW lzZiciDUZk5qM8VN+KEjO5p1txjRDjwFYHVQKwLxN4KRTjjq/kjCDZ3Ztll9Swmn1nZ0 zTELn22pFxoWcyg12sAXXnwpoMkh5LtE7UCueOJasdfh7vyQwDSjWikgYwSMCdIXKex0 HW5Q== X-Gm-Message-State: AOJu0Yzq7BlCKI8jgCttvGG+qutjOpQHz4g8+XvknInbcj+o/jt3NRGS qSN5bw0PSlS+65BdHARLcznPwjHBrAco2wtPhdTbic3LzI3kbFRu050P7nI2Coo16jADW3ZXLl/ SebGWsKcM31jaCYbmkJotZxQUpUyVkOF+l9uSajf6zLhu5SZv X-Gm-Gg: ASbGncu2kYIB1LNqoq8m5PrA2HRd0WZ6BxVOdRh90z+mQDKTN8PL/9MtZW/Om6pzmF+ SWHHUUIpwR+otb5Wdg+hSPLE1ef1M+jEwxo/3/utyOBSC9ja/LrPzyh81xrQ= X-Google-Smtp-Source: AGHT+IEwouxwtomTvb9e/Hel3Cof60NVR/iMBcgVrD/ywR+oeVv/rCPWY58YVrwZktlqko682b0BBiI3A9nxtZdp0AU= X-Received: by 2002:a05:6512:400f:b0:53d:a93c:649e with SMTP id 2adb3069b0e04-53df0109024mr1731339e87.35.1732711543686; Wed, 27 Nov 2024 04:45:43 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jelte Fennema-Nio Date: Wed, 27 Nov 2024 13:45:32 +0100 Message-ID: Subject: Re: Add Pipelining support in psql To: Anthonin Bonnefoy Cc: PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 27 Nov 2024 at 10:50, Anthonin Bonnefoy wrote: > With \bind, \parse, \bind_named and \close, it is possible to issue > queries from psql using the extended protocol. However, it wasn't > possible to send those queries using pipelining and the only way to > test pipelined queries was through pgbench's tap tests. Big +1. Not being able to use psql for even the most basic pipeline tests has definitely been an annoyance of mine. I played around quickly with this patch and it works quite well. A few things that would be nice improvements I think. Feel free to change the command names: 1. Add a \flush command that calls PQflush 2. Add a \flushrequest command that calls PQsendFlushRequest 3. Add a \getresult command so you can get a result from a query without having to close the pipeline To be clear, not having those additional commands isn't a blocker for this patch imho, but I'd definitely miss them if they weren't there when I would be using it.