pgsql: Fix pgbench in prepared mode with an empty pipeline

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix pgbench in prepared mode with an empty pipeline
Date: 2023-05-25 10:37:22
Message-ID: E1q28LT-001dpo-45@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix pgbench in prepared mode with an empty pipeline

It crashes because it references memory that's not allocated in that
particular case. Fix by allocating it.

Reported-by: Alexander Lakhin <exclusion(at)gmail(dot)com>
Discussion: https://postgr.es/m/bcf802a6-afc1-95b9-7bf4-c5dd868ec144@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8f5e42d3346924b5d6330208d62ec1b19fdbc110

Modified Files
--------------
src/bin/pgbench/pgbench.c | 44 ++++++++++++++++------------
src/bin/pgbench/t/001_pgbench_with_server.pl | 2 ++
2 files changed, 28 insertions(+), 18 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Daniel Gustafsson 2023-05-25 10:46:28 pgsql: doc: Fix example query for pg_walinspect
Previous Message Michael Paquier 2023-05-25 07:30:30 pgsql: Fix typo in TAP tests of vacuumdb