Re: pgbench - allow to create partitioned tables

Fabien COELHO <coelho@cri.ensmp.fr>

From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Asif Rehman <asifr.rehman@gmail.com>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2019-09-17T18:49:12Z
Lists: pgsql-hackers

Attachments

Attached v9:

  - remove the PART_UNKNOWN and use partitions = -1 to tell
    that there is an error, and partitions >= 1 to print info
  - use search_path to find at most one pgbench_accounts
    It still uses left join because I still think that it is appropriate.
    I added a lateral to avoid repeating the array_position call
    to manage the search_path, and use explicit pg_catalog everywhere.
  - let the wrongly repeated test name as is
  - somehow use pg_checksums tablespace creation method, however:
    - I kept testing that mkdir succeeds
    - I kept escaping single quotes, if the path contains a "'"
    so the only difference is that on some msys platform it may
    avoid some unclear issue.

-- 
Fabien.

Commits

  1. pgbench: add --partitions and --partition-method options.