On Thu, 30 Jun 2022 at 18:09, Michael Paquier <mich...@paquier.xyz> wrote:
> On Fri, Jul 01, 2022 at 10:06:49AM +0900, Michael Paquier wrote: > > And the conclusion back then is that one can already achieve this by > > using PGOPTIONS: > > PGOPTIONS='-c default_table_access_method=wuzza' pgbench [...] > > > > So there is no need to complicate more pgbench, particularly when it > > comes to partitioned tables where USING is not supported. Your patch > > touches this area of the client code to bypass the backend error. > > Actually, it could be a good thing to mention that directly in the > docs of pgbench. > I've attached a documentation patch that mentions and links to the PGOPTIONS documentation per your suggestion. I'll keep the other patch on the back burner, perhaps in the future there will be demand for a command line option as more TAMs are created. Thanks, -Michel > -- > Michael >
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 37fd80388c..e2d728e0c4 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -317,7 +317,7 @@ UPDATE pg_settings SET setting = reset_val WHERE name = 'configuration_parameter </sect2> - <sect2> + <sect2 id="config-setting-shell"> <title>Parameter Interaction via the Shell</title> <para> diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml index 2acf55c2ac..f15825c293 100644 --- a/doc/src/sgml/ref/pgbench.sgml +++ b/doc/src/sgml/ref/pgbench.sgml @@ -1018,6 +1018,17 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d <literal>always</literal>, <literal>auto</literal> and <literal>never</literal>. </para> + + <para> + The environment variable <envar>PGOPTIONS</envar> specifies database + configuration options that are passed to PostgreSQL via the command line + (See <xref linkend="config-setting-shell"/>). For example, a hypothetical + default Table Access Method for the tables that pgbench creates + called <literal>wuzza</literal> can be specified with: +<programlisting> +PGOPTIONS='-c default_table_access_method=wuzza' +</programlisting> + </para> </refsect1> <refsect1>