Sample Header Ad - 728x90

Should I be concered by large SERIAL values?

1 vote
1 answer
3482 views
I have a Django application that uses PostgreSQL to analyze data from tweets. The data set increases by thousands of records with each request. I am using the database primarily as a cache, so I had planned to delete all records every 24 hours to permit new requests without needlessly increasing the size of the database. Django uses the SERIAL type for storing the ids; a new item is given the next highest value of the last item that was created, rather than the first available number. I don't use the ids for anything outside of the ORM. My concern is that I will eventually run out of key space on my 32 bit VM. What does PostgreSQL when the next value is too large for SERIAL? Does it give error? Does it roll back to one?
Asked by Sean W. (135 rep)
Aug 5, 2013, 08:46 PM
Last activity: Aug 6, 2013, 06:00 PM