Re: Table Partitioning: Sequence jump issue 10 in 10 with serial datatype - Mailing list pgsql-general

From David G. Johnston
Subject Re: Table Partitioning: Sequence jump issue 10 in 10 with serial datatype
Date
Msg-id CAKFQuwajkSW07XY-xmjOkkd40zNfaGGQ2sBJNkagwJRsiGBLDA@mail.gmail.com
Whole thread Raw
In response to Table Partitioning: Sequence jump issue 10 in 10 with serialdatatype  (DrakoRod <drakoflames@hotmail.com>)
Responses Re: Table Partitioning: Sequence jump issue 10 in 10 with serialdatatype
List pgsql-general
On Tuesday, February 13, 2018, DrakoRod <drakoflames@hotmail.com> wrote:
Hi folks!!
I have a problem with a serial data type and partitioned table, I used rules
to insert in child tables. But the problem is that the some does'nt insert
and the sequence value jump sometimes 3 in 3 or 10 in 10.

Do not know what you mean by 'n in n'
 

The example is the next:

Don't see an example...
 

I don't understand why sequence jumps in this case 4 in 4. And how to avoid
this? I really can't change the use serial data type and how generate the
id, because I don't developed the app.

If I use triggers this don't happen?


Without more details it's hard to say but if you need hapless sequences aren't the answer.  There are many reasons committed values could contain gaps. Or in this case avoid requiring it to be when using it.

David J.

pgsql-general by date:

Previous
From: DrakoRod
Date:
Subject: Table Partitioning: Sequence jump issue 10 in 10 with serialdatatype
Next
From: DrakoRod
Date:
Subject: Re: Table Partitioning: Sequence jump issue 10 in 10 with serialdatatype