Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error
Date
Msg-id 20230522114947.4lvw3hxur3pjkx27@alvherre.pgsql
Whole thread Raw
In response to Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error  (Alexander Lakhin <exclusion@gmail.com>)
Responses Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
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)

Attachment

pgsql-hackers by date:

Previous
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: Time delayed LR (WAS Re: logical replication restrictions)
Next
From: Andrew Dunstan
Date:
Subject: Re: Adding SHOW CREATE TABLE