Re: Add table access method as an option to pgbench

2021-01-19 Thread David Zhang
On 2021-01-15 1:22 p.m., Andres Freund wrote: Hi, On 2020-11-25 12:41:25 +0900, Michael Paquier wrote: On Tue, Nov 24, 2020 at 03:32:38PM -0800, David Zhang wrote: But, providing another option for the end user may not be a bad idea, and it might make the tests easier at some points. My firs

Re: Add table access method as an option to pgbench

2021-01-15 Thread Michael Paquier
On Fri, Jan 15, 2021 at 01:22:45PM -0800, Andres Freund wrote: > I think that objection is right. All that's needed to change this from > the client side is to do something like > PGOPTIONS='-c default_table_access_method=foo' pgbench ... > > I don't think adding pgbench options for individual GUC

Re: Add table access method as an option to pgbench

2021-01-15 Thread Andres Freund
Hi, On 2020-11-25 12:41:25 +0900, Michael Paquier wrote: > On Tue, Nov 24, 2020 at 03:32:38PM -0800, David Zhang wrote: > > But, providing another option for the end user may not be a bad idea, and it > > might make the tests easier at some points. > > My first thought is that we have no need to

Re: Add table access method as an option to pgbench

2021-01-15 Thread David Zhang
Hi, `v6-0001-add-table-access-method-as-an-option-to-pgbench` fixed the wording problems for pgbench document and help as they were pointed out by Justin and Youichi. `0001-update-tablespace-to-keep-document-consistency` is trying to make the *tablespace* to be more consistent in pgbench

Re: Add table access method as an option to pgbench

2021-01-14 Thread David Zhang
On 2021-01-09 5:44 a.m., youichi aramaki wrote: + " create tables with using specified table access method,\n" In my opinion, this sentence should be "create tables with specified table access method" or "create tables using specified table access m

Re: Add table access method as an option to pgbench

2021-01-09 Thread youichi aramaki
>+ " create tables with using >specified table access method,\n" In my opinion, this sentence should be "create tables with specified table access method" or "create tables using specified table access method". "create tables with specified table access

Re: Add table access method as an option to pgbench

2021-01-08 Thread David Zhang
tablespace is an extraneous word ? Thanks a lot for pointing this out. I will fix it in next patch once get all issues clarified. On Sun, Dec 27, 2020 at 09:14:53AM -0400, Fabien COELHO wrote: src/test/regress/sql/create_am.sql:CREATE ACCESS METHOD heap2 TYPE TABLE HANDLER heap_tableam_hand

Re: Add table access method as an option to pgbench

2020-12-27 Thread Justin Pryzby
On Sun, Dec 27, 2020 at 09:14:53AM -0400, Fabien COELHO wrote: > > src/test/regress/sql/create_am.sql:CREATE ACCESS METHOD heap2 TYPE TABLE > > HANDLER heap_tableam_handler; > > ... > > src/test/regress/sql/create_am.sql:DROP ACCESS METHOD heap2; > > > Or maybe using SET default_tablespace instea

Re: Add table access method as an option to pgbench

2020-12-27 Thread Fabien COELHO
Hello Justin, src/test/regress/sql/create_am.sql:CREATE ACCESS METHOD heap2 TYPE TABLE HANDLER heap_tableam_handler; ... src/test/regress/sql/create_am.sql:DROP ACCESS METHOD heap2; Or maybe using SET default_tablespace instead of modifying the CREATE sql. That'd need to be done separately

Re: Add table access method as an option to pgbench

2020-12-24 Thread Justin Pryzby
> --- a/doc/src/sgml/ref/pgbench.sgml > +++ b/doc/src/sgml/ref/pgbench.sgml > @@ -359,6 +359,16 @@ pgbench options > d > > > > + > + > --table-access-method=TABLEAM > + > + > +Create tables using the specified table access method, rather than > t

Re: Add table access method as an option to pgbench

2020-12-07 Thread David Zhang
for tables. Thanks, -- David Software Engineer Highgo Software Inc. (Canada) www.highgo.ca From 1d6f434d56c36f95da82d1bae4f99bb917351c08 Mon Sep 17 00:00:00 2001 From: David Zhang Date: Mon, 7 Dec 2020 13:42:00 -0800 Subject: [PATCH] add table access method as an option to pgbench --- doc/s

Re: Add table access method as an option to pgbench

2020-12-02 Thread Fabien COELHO
Hello David, Some feedback about v4. It looks that the option is *silently* ignored when creating a partitionned table, which currently results in an error, and not passed to partitions, which would accept them. This is pretty weird. The input check is added with an error message when both p

Re: Add table access method as an option to pgbench

2020-12-01 Thread David Zhang
e Engineer Highgo Software Inc. (Canada) www.highgo.ca From c25b55580b1b3f3faac63b4d72291c80fb2c9c1f Mon Sep 17 00:00:00 2001 From: David Zhang Date: Tue, 1 Dec 2020 20:47:01 -0800 Subject: [PATCH] add table access method as an option to pgbench --- doc/src/sgml/ref/pgbench.sgml

Re: Add table access method as an option to pgbench

2020-11-27 Thread Fabien COELHO
Hello David, Some feedback about v3: In the doc I find TABLEACCESSMETHOD quite hard to read. Use TABLEAM instead? Also, the next entry uses lowercase (tablespace), why change the style? Remove space after comma in help string. I'd use the more readable TABLEAM in the help string rather th

Re: Add table access method as an option to pgbench

2020-11-26 Thread David Zhang
Thanks Fabien for the comments. On 2020-11-25 11:29 p.m., Fabien COELHO wrote: Hello David, The previous patch was based on branch "REL_13_STABLE". Now, the attached new patch v2 is based on master branch. I followed the new code structure using appendPQExpBuffer to append the new clause "u

Re: Add table access method as an option to pgbench

2020-11-26 Thread David Zhang
on Sep 17 00:00:00 2001 From: David Zhang Date: Thu, 26 Nov 2020 18:08:49 -0800 Subject: [PATCH] add table access method as an option to pgbench --- doc/src/sgml/ref/pgbench.sgml| 9 ++ src/bin/pgbench/pgbench.c| 23 ++- sr

Re: Add table access method as an option to pgbench

2020-11-25 Thread Fabien COELHO
Hello David, The previous patch was based on branch "REL_13_STABLE". Now, the attached new patch v2 is based on master branch. I followed the new code structure using appendPQExpBuffer to append the new clause "using TABLEAM" in a proper position and tested. In the meantime, I also updated th

Re: Add table access method as an option to pgbench

2020-11-25 Thread Michael Paquier
On Wed, Nov 25, 2020 at 12:13:55PM -0800, David Zhang wrote: > The previous patch was based on branch "REL_13_STABLE". Now, the attached > new patch v2 is based on master branch. I followed the new code structure > using appendPQExpBuffer to append the new clause "using TABLEAM" in a proper > posit

Re: Add table access method as an option to pgbench

2020-11-25 Thread David Zhang
Thank a lot for your comments, Michael. On 2020-11-24 7:41 p.m., Michael Paquier wrote: On Tue, Nov 24, 2020 at 03:32:38PM -0800, David Zhang wrote: But, providing another option for the end user may not be a bad idea, and it might make the tests easier at some points. My first thought is that

Re: Add table access method as an option to pgbench

2020-11-24 Thread Michael Paquier
On Tue, Nov 24, 2020 at 03:32:38PM -0800, David Zhang wrote: > But, providing another option for the end user may not be a bad idea, and it > might make the tests easier at some points. My first thought is that we have no need to complicate pgbench with this option because there is a GUC able to d

Add table access method as an option to pgbench

2020-11-24 Thread David Zhang
Hi Hackers, I noticed that there is a table access method API added starting from PG12. In other words, Postgresql open the door for developers to add their own access methods, for example, zheap, zedstore etc. However, the current pgbench doesn't have an option to allow user to specify which