Note that there are some explanatory texts on larger screens.

plurals
  1. POPostgres client locking up when creating new table
    text
    copied!<p>I'm trying to create a new table in postgres but when I do it just hangs after the <code>CREATE TABLE</code> call.</p> <pre><code>$ sudo usermod -s /bin/bash postgres $ sudo su - postgres postgres@host:~$ psql ranking_analytics psql (8.4.8) Type "help" for help. ranking_analytics=# BEGIN; BEGIN ranking_analytics=# CREATE TABLE "about_contactmessage" ( ranking_analytics(# "id" serial NOT NULL PRIMARY KEY, ranking_analytics(# "user_id" integer NOT NULL REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED, ranking_analytics(# "subject" text NOT NULL, ranking_analytics(# "message" text NOT NULL, ranking_analytics(# "recorded_time" timestamp with time zone NOT NULL ranking_analytics(# ) ranking_analytics-# ; NOTICE: CREATE TABLE will create implicit sequence "about_contactmessage_id_seq" for serial column "about_contactmessage.id" </code></pre> <p>It will then just sit here indefinately until I <code>CTRL-C</code> it.</p> <p>There are other tables in the database and this one doesn't already exist:</p> <pre><code>ranking_analytics=# \d about_contactmessage Did not find any relation named "about_contactmessage". </code></pre> <p>I'm able to do insert and delete queries on other tables in the database without a problem:</p> <pre><code>ranking_analytics=# insert into locations_continent (continent_name) VALUES ('testing'); INSERT 0 1 ranking_analytics=# delete from locations_continent where continent_name = 'testing'; DELETE 1 </code></pre> <p>There is plenty of drive space on the machine:</p> <pre><code>$ df -H Filesystem Size Used Avail Use% Mounted on /dev/xvda 21G 2.3G 18G 12% / devtmpfs 255M 132k 255M 1% /dev none 257M 476k 256M 1% /dev/shm none 257M 54k 257M 1% /var/run none 257M 0 257M 0% /var/lock </code></pre> <p>Any ideas what could be wrong?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload