<div>Hello</div><div>This is not bug. Sequences are never rollback by design.</div><div> </div><div>https://www.postgresql.org/docs/current/static/sql-createsequence.html</div><div>> Because <code>nextval</code> and <code>setval</code> calls are never rolled back, sequence objects cannot be used if <span>“<span>gapless</span>”</span> assignment of sequence numbers is needed.</div><div> </div><div>regards, Sergei</div>