Clean Docker install has missing relations


(Sander Datema) #1

I get errors like these:

2014-04-01 15:47:51 UTC ERROR:  relation "users" does not exist at character 323
2014-04-01 15:47:51 UTC STATEMENT:                SELECT a.attname, format_type(a.atttypid, a.atttypmod),
	                     pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
	                FROM pg_attribute a LEFT JOIN pg_attrdef d
	                  ON a.attrelid = d.adrelid AND a.attnum = d.adnum
	               WHERE a.attrelid = '"users"'::regclass
	                 AND a.attnum > 0 AND NOT a.attisdropped
	               ORDER BY a.attnum

And there are more, like missing site_settings relation:

2014-04-01 15:48:09 UTC ERROR:  relation "site_settings" does not exist at character 36
2014-04-01 15:48:09 UTC STATEMENT:  select name, data_type, value from site_settings

BTW, I use the multisite instructions:


Failure on restore: ERROR: relation "users" does not exist
(Jeff Atwood) #2

I saw those errors in the log too when provisioning a new Discourse site, but they don’t appear to affect the final site – it was fully operational after the install.

I hesitate to call this a “bug”, since nothing is broken?


Cannot access topics after upgrade from 1.6.0.beta1 to beta2
(Sander Datema) #3

Yeah, you might be right. I just noticed the site seems to be running fine indeed.


(Archon) #4

Any news about a fix?


(Zsolt Ero) #5

I can confirm this is still a visible error in a brand new Docker on DO install.

rails/production.log starts with this:

PG::Error: ERROR:  relation "users" does not exist
LINE 5:                WHERE a.attrelid = '"users"'::regclass
                                          ^
:               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
                     pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
                FROM pg_attribute a LEFT JOIN pg_attrdef d
                  ON a.attrelid = d.adrelid AND a.attnum = d.adnum
               WHERE a.attrelid = '"users"'::regclass
                 AND a.attnum > 0 AND NOT a.attisdropped
               ORDER BY a.attnum

(Sam Saffron) #6

To me this looks like a logging issue. Once migration is done it goes away.