Re: Sequence gaps after restart

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Sequence gaps after restart
Дата
Msg-id 853211.1620749759@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Sequence gaps after restart  (Christopher Sumner <christopher.sumner@adimab.com>)
Список pgsql-general
Christopher Sumner <christopher.sumner@adimab.com> 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



В списке pgsql-general по дате отправления:

Предыдущее
От: Rob Sargent
Дата:
Сообщение: Re: Sequence gaps after restart
Следующее
От: Vijaykumar Jain
Дата:
Сообщение: Re: force partition pruning