Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: Yugo NAGATA <nagata@sraoss.co.jp>, Andres Freund <andres@anarazel.de>, Tom Lane <tgl@sss.pgh.pa.us>, Fabien COELHO <coelho@cri.ensmp.fr>, pgsql-hackers@postgresql.org
Date: 2023-05-22T11:49:47Z
Lists: pgsql-hackers
Attachments
On 2023-May-20, Alexander Lakhin wrote: > Starting from 038f586d5, the following script: > echo " > \startpipeline > \endpipeline > " >test.sql > pgbench -n -M prepared -f test.sql > > leads to the pgbench's segfault: Hah, yeah, that's because an empty pipeline never calls the code to allocate the flag array. Here's the trivial fix. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "El hombre nunca sabe de lo que es capaz hasta que lo intenta" (C. Dickens)
Commits
-
Fix pgbench in prepared mode with an empty pipeline
- 8f5e42d33469 16.0 landed
- 34f51196573c 15.4 landed
-
pgbench: Prepare commands in pipelines in advance
- 663e50e83211 14.8 landed
- 108a22bd14d4 15.3 landed
- 038f586d5f1d 16.0 landed
-
Add -M (query mode) option per ITAGAKI Takahiro
- 49639a7b2c52 8.4.0 cited