Re: Could postgres12 support millions of sequences? (like 10 million) - Mailing list pgsql-general

From David G. Johnston
Subject Re: Could postgres12 support millions of sequences? (like 10 million)
Date
Msg-id CAKFQuwZOzgtAb27wnS9bj6QBYRuHShEEPgs4mGCEr4Qz0SUKbw@mail.gmail.com
Whole thread Raw
In response to Re: Could postgres12 support millions of sequences? (like 10 million)  (pabloa98 <pabloa98@gmail.com>)
List pgsql-general
On Thursday, March 19, 2020, pabloa98 <pabloa98@gmail.com> wrote:

We will use a CACHE 1. This is because when nextval('seq') is invoked, we are hitting 3 or 4 more tables so the sequence will not be a performance blocker (compared with all the operations in the transaction).

The other implementation detail to remember is:

“Because nextval and setval calls are never rolled back, sequence objects cannot be used if gapless assignment of sequence numbers is needed.”

David J.

 

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Could postgres12 support millions of sequences? (like 10 million)
Next
From: Matt Magoffin
Date:
Subject: Duplicate key violation on upsert