作者
digoal
日期
2019-03-31
标签
PostgreSQL , pgbench , 绑定变量 , 256
背景
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=a47841528107921f02c280e0c5f91c5a1d86adb0
pgbench 是pg的压测客户端工具,可以自定义SQL,自定义变量等。详细使用方法参考pgbench官方文档。
在自定义压测脚本时,一条SQL最多可以使用10个变量,PG 12 pgbench做了一些调整,允许支持256个变量,支持压测更丰富的场景。
```
pgbench: increase the maximum number of variables/arguments
pgbench's arbitrary limit of 10 arguments for SQL statements or
metacommands is far too low. Increase it to 256.
This results in a very modest increase in memory usage, not enough to
worry about.
The maximum includes the SQL statement or metacommand. This is reflected
in the comments and revised TAP tests.
Simon Riggs and Dagfinn Ilmari Mannsåker with some light editing by me.
Reviewed by: David Rowley and Fabien Coelho
Discussion: https://postgr.es/m/CANP8+jJiMJOAf-dLoHuR-8GENiK+eHTY=Omw38Qx7j2g0NDTXA@mail.gmail.com
```
参考
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=a47841528107921f02c280e0c5f91c5a1d86adb0
PostgreSQL 许愿链接
您的愿望将传达给PG kernel hacker、数据库厂商等, 帮助提高数据库产品质量和功能, 说不定下一个PG版本就有您提出的功能点. 针对非常好的提议,奖励限量版PG文化衫、纪念品、贴纸、PG热门书籍等,奖品丰富,快来许愿。开不开森.