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 1u53o6-00BYS8-7L for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Apr 2025 14:32:06 +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 1u53o3-00G6PB-Dv for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Apr 2025 14:32:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u53o2-00G6P3-VX for pgsql-hackers@lists.postgresql.org; Wed, 16 Apr 2025 14:32:03 +0000 Received: from mail.postgrespro.ru ([93.174.132.70]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u53o1-000NxX-1e for pgsql-hackers@postgresql.org; Wed, 16 Apr 2025 14:32:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1744813920; bh=mGs33jsJe70/34BiOa+7RK6O6nS+XDOSA2sTPmpHESI=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=RhLYpfkjFlWYRNAL3iotipbyhsIYhXssL/38cI0CkEUBjd2qxD4OMKFRtEFb5q9QO ulH+2+2Tz0goJhA78FEy5c6s5qKGpgXj0VkWWGcU6l+c1LoaZ8B0VvcjN0/3qhVOWs cucc40jtU7HXIhYJGcPWHRLvsHtARgmIAj8Lj1VS1qYWDss0dIPlQTdIaaNG5GJphr +f/tGJYjzq8DV7Wy2qkZpsitPl6maqW/ZU28rgUc7NcEHy1ZTlzT1CWfOAPU1ZCmvs UyqQ8FAEzFY60+8feaOGH8JDaYdzPiJ94kqdNdMC2Vp1EY0ESxEF4ReVczcvf2sllO qHxluVyZHv36w== Received: from [172.30.48.66] (unknown [93.174.131.138]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: a.kozhemyakin@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id DAD45606E1; Wed, 16 Apr 2025 17:31:59 +0300 (MSK) Message-ID: Date: Wed, 16 Apr 2025 21:31:59 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Add Pipelining support in psql To: Michael Paquier , Daniel Verite Cc: Anthonin Bonnefoy , Jelte Fennema-Nio , PostgreSQL Hackers References: Content-Language: ru From: "a.kozhemyakin" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-KSMG-AntiPhishing: NotDetected X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.1.0.7854, bases: 2025/04/16 12:51:00 #27893531 X-KSMG-AntiVirus-Status: NotDetected, skipped X-KSMG-LinksScanning: not scanned, disabled by settings X-KSMG-Message-Action: skipped X-KSMG-Rule-ID: 1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello, After commit 2cce0fe on master When executing query: psql postgres <) at ./nptl/pthread_kill.c:44 #1  __pthread_kill_internal (signo=6, threadid=) at ./nptl/pthread_kill.c:78 #2  __GI___pthread_kill (threadid=, signo=signo@entry=6) at ./nptl/pthread_kill.c:89 #3  0x0000760edd24527e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26 #4  0x0000760edd2288ff in __GI_abort () at ./stdlib/abort.c:79 #5  0x0000760edd22881b in __assert_fail_base (fmt=0x760edd3d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",     assertion=assertion@entry=0x5ba46ab79850 "res == ((void *)0) || result_status == PGRES_PIPELINE_ABORTED", file=file@entry=0x5ba46ab6fcad "common.c",     line=line@entry=1510, function=function@entry=0x5ba46ab9c780 <__PRETTY_FUNCTION__.3> "discardAbortedPipelineResults") at ./assert/assert.c:96 #6  0x0000760edd23b517 in __assert_fail (assertion=assertion@entry=0x5ba46ab79850 "res == ((void *)0) || result_status == PGRES_PIPELINE_ABORTED",     file=file@entry=0x5ba46ab6fcad "common.c", line=line@entry=1510,     function=function@entry=0x5ba46ab9c780 <__PRETTY_FUNCTION__.3> "discardAbortedPipelineResults") at ./assert/assert.c:105 #7  0x00005ba46ab2bd40 in discardAbortedPipelineResults () at common.c:1510 #8  ExecQueryAndProcessResults (query=query@entry=0x5ba4a2ec1e10 "SELECT 'val1';", elapsed_msec=elapsed_msec@entry=0x7ffeb07262a8,     svpt_gone_p=svpt_gone_p@entry=0x7ffeb07262a7, is_watch=is_watch@entry=false, min_rows=min_rows@entry=0, opt=opt@entry=0x0, printQueryFout=0x0)     at common.c:1811 #9  0x00005ba46ab2983f in SendQuery (query=0x5ba4a2ec1e10 "SELECT 'val1';") at common.c:1212 #10 0x00005ba46ab3f66a in MainLoop (source=source@entry=0x760edd4038e0 <_IO_2_1_stdin_>) at mainloop.c:515 #11 0x00005ba46ab23f2a in process_file (filename=0x0, use_relative_path=use_relative_path@entry=false) at command.c:4870 #12 0x00005ba46ab1e9d9 in main (argc=, argv=0x7ffeb07269d8) at startup.c:420 06.03.2025 11:20, Michael Paquier пишет: > On Wed, Mar 05, 2025 at 03:25:12PM +0100, Daniel Verite wrote: >> Anthonin Bonnefoy wrote: >>> I do see the idea to make it easier to convert existing scripts into >>> using pipelining. The main focus of the initial implementation was >>> more on protocol regression tests with psql, so that's not necessarily >>> something I had in mind. >> Understood. Yet pipelining can accelerate considerably certain scripts >> when client-server latency is an issue. We should expect end users to >> benefit from it too. > That was not a test case we had in mind originally here, but if it is > possible to keep the implementation simple while supporting your > demand, well, let's do it. If it's not that straight-forward, let's > use the new meta-command, forbidding \g and \gx based on your > arguments from upthread. > -- > Michael