How different types of counters work depends on how app and workspace data is stored and processed in PostgreSQL. This directly affects index assignment speed, system load, and numerator behavior during database updates and restarts.
Below are the main features of each numerator type along with recommendations to help you choose the best option for your needs.
App counter behavior
When updating or restarting the PostgreSQL database, index values for new app items may shift. For example, this can happen after upgrading to a new system version.
Possible solutions:
- If numbering gaps or shifts are critical, use a workspace counter instead. Keep in mind that index assignment may require extra resources when creating items automatically in bulk.
- If numbering shifts are not critical, use an app counter. If a shift occurs, you can adjust the numbering in the settings.
Workspace counter behavior
Restarting or updating the PostgreSQL database does not affect numbering sequence. When using a workspace counter, numbering shifts will not occur.
However, creating items in bulk—for example, using scripts—requires more resources to assign indexes, which may increase item creation time.
How to fix numbering shifts after a PostgreSQL restart
If your app uses an app counter and an index shift occurs after a PostgreSQL update or restart, choose one of the following options based on your numbering requirements:
- Set up a workspace counter instead of an app counter. During setup, specify the number to continue numbering from in the Initial value* field.
This option prevents index shifts when the database restarts.
- If you do not need a workspace counter and the shift is acceptable, open the app counter settings and manually set the next required number.
Note that you will need to reconfigure this setting after every database restart.