1

I am trying for the first time citusdb, and in the download page, they put a getting started guide, so I am following it.

First, I am trying this on my local computer, and with the sample data on the third point of the getting started guide here.

There, they offer a modified psql so you can use it with citusdb. First I connect with this:

/opt/citusdb/2.0/bin/psql -U postgres -h localhost -d postgres

Then, when I try to create a database, the guide says that you can use the reserved word DISTRIBUTE, but when I try the command on the guide:

CREATE TABLE customer_reviews
(
    customer_id TEXT not null,
    review_date DATE not null,
    review_rating INTEGER not null,
    review_votes INTEGER,
    review_helpful_votes INTEGER,
    product_id CHAR(10) not null,
    product_title TEXT not null,
    product_sales_rank BIGINT,
    product_group TEXT,
    product_category TEXT,
    product_subcategory TEXT,
    similar_product_ids CHAR(10)[]
)
DISTRIBUTE BY APPEND (review_date);

It seems that the psql is not accepting the DISTRIBUTE word, because it shows an syntax error at or near DISTRIBUTE

Please help if someone has used this, and knows what the problem is, maybe it is too obvious, but it is my first time with citusdb.

Thank you.

metdos
  • 13,411
  • 17
  • 77
  • 120
eLRuLL
  • 18,488
  • 9
  • 73
  • 99
  • Please, someone with the required reputation, create the `citusdb` tag, and update the post. – eLRuLL May 27 '13 at 23:30
  • @eLRuLL are you sure that citusdb instance is running and you are not connected to standard postgres instance? Please check with ps aux | grep post , and you should see /opt/citusdb/2.0/bin/postgres in this list. – metdos Jun 13 '13 at 07:49

2 Answers2

5

I'd say you're connecting to a normal PostgreSQL instance, not their hacked-up PostgreSQL. Try select version() to confirm that.

Perhaps you're running CitusDB on a different port, like 5433?

Craig Ringer
  • 307,061
  • 76
  • 688
  • 778
  • I was running `sudo -u postgres /opt/citusdb/2.0/bin/pg_ctl -D /opt/citusdb/2.0/data -l logfile start`, but I first needed to stop my default postgres service. It seems that if postgres is running it just leave it there, not showing errors. – eLRuLL Jun 13 '13 at 14:14
0

You need to make sure you are running the citus provided psql, which is provided in /opt

user32365
  • 39
  • 1