Edgewall Software

Opened 18 years ago

Last modified 13 months ago

#3308 closed defect

"relation "system" does not exist" when using multiple Postgres schema in same DB — at Version 3

Reported by: virl@… Owned by: Jonas Borgström
Priority: normal Milestone: 0.10
Component: general Version: devel
Severity: major Keywords: schema, relation, system, feedback, postgresql
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

When using one Postgres DB with multiple schemas with Trac projects, there is must be "public" schema containing "system" table. In other words, database_version is wrongly checked against public schema, not schema of project.

I think problem is here:

  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'")

Maybe schema specification before "system" needed?

Change History (3)

comment:1 by anonymous, 18 years ago

Wrongly checked, I mean.

comment:2 by Jonas Borgström, 18 years ago

Status: newassigned

As soon as a new postgresql connection is established the search path is set to first look in the specified schema and after that "public".

The most likely explanation for this error message is that an incorrect schema name (or non at all) is specified in the database connection string. Can you please verify that you have a connection string like this in your trac.ini:

database = postgres:///database?schema=yourschemaname
or
database = postgres://user:pass@server/database?schema=yourschemaname

comment:3 by Christian Boos, 18 years ago

Description: modified (diff)
Keywords: feedback added
Note: See TracTickets for help on using tickets.