How are topic IDs generated?

Are they created following a simple arithmetic pattern? Also, are they based for the entirety of an instance, or only personal accounts? I’m using the API and seeing some inconsistencies.

It’s a PostgreSQL sequence. It increases +1 for every new topic.

4 Likes

Thanks for the quick response! Are they unique values across the entire Discourse instance or are they based on each individual user?

They’re unique across the whole instance.

5 Likes