koji build server install - DatabaseError: error 'ERROR: relation "sessions_id_seq" does not exist

Mike McLean mikem at redhat.com
Fri Nov 5 17:06:29 UTC 2010


On 11/05/2010 12:52 PM, steve.webb at beatport.com wrote:
> DatabaseError: error 'ERROR:  relation "sessions_id_seq" does not exist
> LINE 1: SELECT nextval('sessions_id_seq')
>                           ^
> ' in 'SELECT nextval('sessions_id_seq')'
>
> I checked out the DB schema and didn't see a 'sessions_id_seq' anywhere,
> and the only place that I could find it was in auth.py in the koji python
> utilities scripts (which is where it's failing, I believe).

Such sequences are automatically created when the serial type is used in 
a column definition. Koji's schema uses the serial type for most primary 
key fields.

The possibilities I can think of are:
1. your postgres has chosen the sequence name differently for some reason
2. something went horribly wrong when you initialized the db
3. the schema was altered

You can check for (1) at least by looking at the sequences in your db. 
The \ds command in psql will do this.

> Can someone explain to me how this is being used and/or how to fix this
> issue?


More information about the buildsys mailing list