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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pabloa98 <pabloa98(at)gmail(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Michael Lewis <mlewis(at)entrata(dot)com>, Rob Sargent <robjsargent(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Could postgres12 support millions of sequences? (like 10 million)
Date: 2020-03-20 05:45:50
Message-ID: CAKFQuwZOzgtAb27wnS9bj6QBYRuHShEEPgs4mGCEr4Qz0SUKbw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday, March 19, 2020, pabloa98 <pabloa98(at)gmail(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Matt Magoffin 2020-03-20 09:17:40 Duplicate key violation on upsert
Previous Message David G. Johnston 2020-03-20 05:39:50 Re: Could postgres12 support millions of sequences? (like 10 million)