This is not considered good practice. For example, two processes that perform inserts in a table with simultaneous transactions may, on some servers, have pieces of identifiers assigned to them, so any row inserted from one transaction will have a lower id than any row inserted from another transaction. In addition, this can sometimes cause spaces in the sequence of identifiers. And there may be other scenarios that may happen unexpectedly.
In short, auto-incrementing identifiers are not always guaranteed to be continuous and upstream.
source share