Re: Add table access method as an option to pgbench

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: David Zhang <david(dot)zhang(at)highgo(dot)ca>
Cc: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add table access method as an option to pgbench
Date: 2020-12-25 03:24:45
Message-ID: 20201225032445.GX30237@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> --- a/doc/src/sgml/ref/pgbench.sgml
> +++ b/doc/src/sgml/ref/pgbench.sgml
> @@ -359,6 +359,16 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
> </listitem>
> </varlistentry>
>
> + <varlistentry>
> + <term><option>--table-access-method=<replaceable>TABLEAM</replaceable></option></term>
> + <listitem>
> + <para>
> + Create tables using the specified table access method, rather than the default.
> + tablespace.

tablespace is an extraneous word ?

Also, I mention that the regression tests do this to get a 2nd AM:

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;

David:
If you found pre-existing inconsistencies/errors/deficiencies, I'd suggest to
fix them in a separate patch. Typically those are small, and you can make them
0001 patch. Errors might be worth backpatching, so in addition to making the
"feature" patches small, it's good if they're separate.

Like writing NAME vs TABLESPACE. Or escape vs escapes.

Or maybe using SET default_tablespace instead of modifying the CREATE sql.
That'd need to be done separately for indexes, and RESET after creating the
tables, to avoid accidentally affecting indexes, too.

@Fabien: I think the table should be created and populated within the same
transaction, to allow this optimization in v13 to apply during the
"initialization" phase.
c6b92041d Skip WAL for new relfilenodes, under wal_level=minimal.

--
Justin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2020-12-25 03:53:33 Re: Deadlock between backend and recovery may not be detected
Previous Message Kyotaro Horiguchi 2020-12-25 03:03:57 Re: A failure of standby to follow timeline switch