Re: pgbench - allow to create partitioned tables

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: pgbench - allow to create partitioned tables
Дата
Msg-id alpine.DEB.2.21.1909280747170.19108@lancre
обсуждение исходный текст
Ответ на Re: pgbench - allow to create partitioned tables  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: pgbench - allow to create partitioned tables  (Amit Kapila <amit.kapila16@gmail.com>)
Список 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.
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Change atoi to strtol in same place
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Cleanup code related to OpenSSL <= 0.9.6 infe/be-secure-openssl.c