I ran into an interesting issue just now that I thought I should mention.
The id
column in the tags_taggeditem
table became larger than the max integer size. The number of records in the table was only 946_149, but the max(id)
value was 2_138_707_489, and the next value it wanted to insert was 2_147_483_647. The error message was:
psycopg2.errors.SequenceGeneratorLimitExceeded: nextval: reached maximum value of sequence "tags_taggeditem_id_seq" (2147483647)
which was preventing me from uploading any new songs.
I looked at my tags table, and found that nearly all of my tags were things that had been added by podcasts. I deleted a bunch of tags in the admin UI, and then ran ALTER SEQUENCE tags_taggeditem_id RESTART;
in postgres. After that, uploads worked again.
I'm guessing this is a problem that comes up if you have a lot of podcast channels where each podcast describes itself with a lot of tags. Apparently, I have this scenario.