Re: pgbench - allow to create partitioned tables
От | Amit Kapila |
---|---|
Тема | Re: pgbench - allow to create partitioned tables |
Дата | |
Msg-id | CAA4eK1Jd5FCXH_=i=yr2u8na6T7PKw0dY3ipU739qyjKaY+JBg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: pgbench - allow to create partitioned tables (Amit Kapila <amit.kapila16@gmail.com>) |
Ответы |
Re: pgbench - allow to create partitioned tables
|
Список | pgsql-hackers |
On Tue, Sep 17, 2019 at 4:24 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Sat, Sep 14, 2019 at 6:35 PM Fabien COELHO <coelho@cri.ensmp.fr> wrote: > > One more comment: > +typedef enum { PART_NONE, PART_RANGE, PART_HASH, PART_UNKNOWN } > + partition_method_t; > > See, if we can eliminate PART_UNKNOWN. I don't see much use of same. > It is used at one place where we can set PART_NONE without much loss. > Having lesser invalid values makes code easier to follow. > Looking more closely at this case: + else if (PQntuples(res) != 1) + { + /* unsure because multiple (or no) pgbench_accounts found */ + partition_method = PART_UNKNOWN; + partitions = 0; + } Is it ever possible to have multiple pgbench_accounts considering we have unique index on (relname, relnamespace) for pg_class? -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: