#3308: "relation "system" does not exist" when using multiple Postgres schema in
same DB
------------------------------------------------------+---------------------
 Reporter:  [EMAIL PROTECTED]                             |        Owner:  
jonas   
     Type:  defect                                    |       Status:  assigned
 Priority:  normal                                    |    Milestone:  0.10    
Component:  general                                   |      Version:  devel   
 Severity:  major                                     |   Resolution:          
 Keywords:  schema postgres relation system feedback  |  
------------------------------------------------------+---------------------
Comment (by [EMAIL PROTECTED]):

 No, database connection string is correct. It is:
 database = postgres://tracdbuser:[EMAIL PROTECTED]/tracdb?schema=myproj

 When there are also public schema (created via trac-admin) in database
 tracdb - everything is fine: it works with "myproj" schema.
 But after renaming or deleting public schema, trac.cgi prints following
 for "myproj" project:
 (Sorry, I don't know how to put this error message in scrollable box)
 --- cut here ---
 Oops...

 Trac detected an internal error:

 relation "system" does not exist


 Traceback (most recent call last):
   File "/var/www/html/dev/yttrium/trac.cgi", line 20, in ?
     cgi_frontend.run()
   File "/usr/lib/python2.4/site-packages/trac/web/cgi_frontend.py", line
 68, in run
     gateway.run(dispatch_request)
   File "/usr/lib/python2.4/site-packages/trac/web/wsgi.py", line 87, in
 run
     response = application(self.environ, self._start_response)
   File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 303, in
 dispatch_request
     env = _open_environment(env_path, run_once=environ['wsgi.run_once'])
   File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 50, in
 _open_environment
     return open_environment(env_path)
   File "/usr/lib/python2.4/site-packages/trac/env.py", line 432, in
 open_environment
     if env.needs_upgrade():
   File "/usr/lib/python2.4/site-packages/trac/env.py", line 312, in
 needs_upgrade
     if participant.environment_needs_upgrade(db):
   File "/usr/lib/python2.4/site-packages/trac/env.py", line 366, in
 environment_needs_upgrade
     dbver = self.env.get_version(db)
   File "/usr/lib/python2.4/site-packages/trac/env.py", line 235, in
 get_version
     cursor.execute("SELECT value FROM system WHERE
 name='database_version'")
   File "/usr/lib/python2.4/site-packages/trac/db/util.py", line 48, in
 execute
     return self.cursor.execute(sql)
   File "/usr/lib/python2.4/site-packages/trac/db/util.py", line 48, in
 execute
     return self.cursor.execute(sql)
 ProgrammingError: relation "system" does not exist
 --- cut here ---

 But "system" table exist both in "public" and "myproj" schemas and in both
 of them have correct database_version value.

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/3308>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets

Reply via email to