Re: Could postgres12 support millions of sequences? (like 10 million)

Поиск
Список
Период
Сортировка
От pabloa98
Тема Re: Could postgres12 support millions of sequences? (like 10 million)
Дата
Msg-id CAEjudX7VxHjpv3i8e+evtwVSdTWJce7j6aK32a7fNxkNKE-bWA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Could postgres12 support millions of sequences? (like 10 million)  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general

> Now I read this paragraph, I realize I was not clear enough.
> I am saying we do not want to use locks because of all the problems
> described.

And what I was asking is what locking where you doing?

And it might be better to ask the list how to solve those problems, then
to create a whole new set of problems by using millions of sequences.

What we are doing in the **OTHER section** with row locks is basically:

BEGIN;
...
x = SELECT last_value + 1 FROM counter WHERE group = ... AND element = .... FOR UPDATE;
...

if everything is fine, then:
    UPDATE counter SET last_value = x WHERE group = ... AND element = .... FOR UPDATE;
    COMMIT;
else:
    ROLLBACK;



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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Duplicate key violation on upsert
Следующее
От: Christopher Browne
Дата:
Сообщение: Re: Could postgres12 support millions of sequences? (like 10 million)