Christopher Sumner <christopher.sumner@xxxxxxxxxx> writes: > I'm using PostgreSQL v. 10.14 via AWS Aurora Serverless. Our users > recently noticed gaps in the primary ids for many of our tables. As I > understand it, this is due to PostgreSQL effectively caching 32 additional > sequence values (hardcoded in sequence.c ) and a 'restart' occurs. Well, 32 is the worst case, but yes this is behaving as intended. > Are there any plans to fix this issue No. If you must have gapless values, don't use sequences. regards, tom lane