YugaByte DB是否支持pgbench?

时间:2019-07-31 12:29:09

标签: distributed-database yugabyte-db

当我尝试运行pgbench时,在初始化阶段遇到一个错误,提示“尚不支持此ALTER TABLE命令。”请参见以下详细信息:

$ pgbench -i -U postgres -d postgres -p 5433 -h 127.0.0.1  
NOTICE:  table "pgbench_branches" does not exist, skipping  
WARNING:  Storage parameter fillfactor is unsupported, ignoring  
NOTICE:  table "pgbench_tellers" does not exist, skipping  
WARNING:  Storage parameter fillfactor is unsupported, ignoring  
NOTICE:  table "pgbench_accounts" does not exist, skipping  
WARNING:  Storage parameter fillfactor is unsupported, ignoring  
NOTICE:  table "pgbench_history" does not exist, skipping  
creating tables...  
10000 tuples done.  
20000 tuples done.  
30000 tuples done.  
40000 tuples done.  
50000 tuples done.  
60000 tuples done.  
70000 tuples done.  
80000 tuples done.  
90000 tuples done.  
100000 tuples done.  
**set primary key...  
ERROR:  This ALTER TABLE command is not yet supported**.  

1 个答案:

答案 0 :(得分:1)

当前,在YugaByte DB中,必须将PRIMARY KEY子句指定为CREATE TABLE语句的一部分,并且事后不能通过ALTER TABLE命令添加。

我们最近对“ pgbench”实用程序(作为YugaByte DB发行版的一部分捆绑在一起)进行了更改,以将PRIMARY KEY指定为CREATE TABLE语句本身的一部分。

相关问题是:   https://github.com/YugaByte/yugabyte-db/issues/1774 相关的提交:  https://github.com/YugaByte/yugabyte-db/commit/35b79bc35eede9907d917d72e516350a4f6bd281