Re: pgbench MAX_ARGS

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgbench MAX_ARGS
Date: 2019-02-26 12:57:14
Message-ID: CANP8+jJkquQHR+DJ6=s_UHqFxmjV+2FwTZH-Uk3zz_NRZp5Rsw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 26 Feb 2019 at 12:19, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> wrote:

>
> Hello Simon,
>

Thanks for reviewing Fabien,

> > pgbench has a strange restriction to only allow 10 arguments, which is
> too
> > low for some real world uses.
> >
> > Since MAX_ARGS is only used for an array of pointers and an array of
> > integers increasing this should not be a problem, so increase value to
> 255.
>

> Probably I would have chosen a smaller value, eg 32 or 64, but I have not
> seen your use case.
>

I've put it as 256 args now.

The overhead of that is about 2kB, so not really an issue.

People are using pgbench for real testing, so no need for setting it too
low.

I notice that there is no documentation update, which just shows that
> indeed there are no documentation about the number of arguments, maybe the
> patch could add a sentence somewhere? There is no limit discussed in the
> PREPARE documentation, I tested up to 20. I'd sugggest to add something at
> the end of the paragraph about variable substitution in the "Custom
> Script" section, eg "A maximum of XX variable references can appear within
> an SQL command.".
>

Added as you suggest.

--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
pgbench_maxargs.v2.patch application/octet-stream 2.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2019-02-26 13:15:55 Re: COPY FREEZE and setting PD_ALL_VISIBLE/visibility map bits
Previous Message Robert Haas 2019-02-26 12:54:12 Re: Remove Deprecated Exclusive Backup Mode