How big can Django primary keys get?
django, django-models, django-postgresql, primary-key
Solution
Django's auto-incrementing IDs are AutoFields, a subclass of IntegerField. It will generate the primary keys as PostgreSQL `integer`, which are signed 32-bit integers with a maximum value of 2147483647, a little over 2 billion.
Problem
Is there a maximum value as to how high pk values for a model can get? For example, for something like an activity feed model, the pk's can get really large. Ex, "Kyle liked this post", "Alex commented on this post" etc..As you can see, for every action, an activity feed object is created. Is there some sort of maximum threshold that will be reached? I've done some research but haven't found a concise answer. If there is some limit, how can one overcome this? I currently use PostgreSQL as my database.