On Thu, 4 Aug 2022 at 10:52, sivapostgres@xxxxxxxxx <sivapostgres@xxxxxxxxx> wrote: > I see 'identity' column values increment even when some error(s) occurs while inserting data. Is that a known bug or known behavior? Known behaviour, explained thousand of times over the years. Identity is not a way to generate consecutive values, not ever guaranteed ascending values, it is for generating unique values. The implementation burn the values before commit/rollback for better concurreency, search archives or docs for details. In your example, id is allocated and burnt to generate the complete failing row, when it fails it is gone. Search lists, google, the docs, its been explained ad nauseam. Francisco Olarte.