Re: pgbench - allow to create partitioned tables - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: pgbench - allow to create partitioned tables
Date
Msg-id alpine.DEB.2.21.1909280747170.19108@lancre
Whole thread Raw
In response to Re: pgbench - allow to create partitioned tables  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: pgbench - allow to create partitioned tables
List pgsql-hackers
Hello Amit,

> I think we might also need to use pg_get_partkeydef along with
> pg_partition_tree to fetch the partition method information.  However,
> I think to find reloid of pgbench_accounts in the current search path,
> we might need to use some part of query constructed by Fabien.
>
> Fabien, what do you think about Alvaro's suggestion?

I think that the current straightforward SQL query is and works fine, and 
I find it pretty elegant. No doubt other solutions could be implemented to 
the same effect, with SQL or possibly through introspection functions.

Incidentally, ISTM that "pg_partition_tree" appears in v12, while 
partitions exist in v11, so it would break uselessly backward 
compatibility of the feature which currently work with v11, which I do not 
find desirable.

Attached v18:
  - remove the test tablespace
    I had to work around a strange issue around partitioned tables and
    the default tablespace.
  - creates a separate function for setting scale, partitions and
    partition_method

-- 
Fabien.
Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Change atoi to strtol in same place
Next
From: Michael Paquier
Date:
Subject: Re: Cleanup code related to OpenSSL <= 0.9.6 infe/be-secure-openssl.c