BUG #14983: ERROR: duplicate key value violates unique constraint "oid_tbl_oid_key"

From: "REIX, Tony" <tony(dot)reix(at)atos(dot)net>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>, Noah Misch <noah(at)leadboat(dot)com>
Cc: "EMPEREUR-MOT, SYLVIE" <sylvie(dot)empereur-mot(at)atos(dot)net>, "APEKE, SENA (ext)" <sena(dot)apeke(dot)external(at)atos(dot)net>
Subject: BUG #14983: ERROR: duplicate key value violates unique constraint "oid_tbl_oid_key"
Date: 2018-03-02 13:39:14
Message-ID: B37989F2852398498001550C29155BE5184F8A4C@FRCRPVV9EX3MSX.ww931.my-it-solutions.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Michael,

Sorry for answering so late. I missed your answer.
We are still trying to figure out what is the root cause of this issue with: AIX XLC -O2 32bit.
I see no issue with AIX XLC -O0 32bit or AIX XLC -O2 64bit or AIX GCC -O2 32bit and Linux/* 64bit. However, I have no Linux 32bit machine available.

Recently, we have discovered that, in file: src/include/port/atomics/arch-ppc.h , the way the pg_memory_barrier_impl is implemented may be differently implemented on AIX when using GCC or XLC. We have to experiment with a change: #if defined(__GNUC__) || defined(__xlc__) .

We'll experiment with your suggestions.

About the buildfarm, I faced a blocking issue.

Sena will help me about PostgreSQL on AIX.

However, reading PostgreSQL documentation, it seems possible that this behavior appears ... by design.
Read lines begining by: >>>

https://www.postgresql.org/docs/10/static/sql-createtable.html
CREATE TABLE WITH ( storage_parameter [= value] [, ... ] )
This clause specifies optional storage parameters for a table or index;
see Storage Parameters for more information.
- The WITH clause for a table can also include OIDS=TRUE (or just OIDS) to specify that rows of the
new table should have OIDs (object identifiers) assigned to them, or OIDS=FALSE to specify that
the rows should not have OIDs.
- If OIDS=FALSE is specified or implied, the new table does not store OIDs and no OID will be assigned
for a row inserted into it.
This is generally considered worthwhile, since it will reduce OID consumption and thereby postpone
>>> the wraparound of the 32-bit OID counter.
>>> Once the counter wraps around, OIDs can no longer be assumed to be unique,
which makes them considerably less useful.

Cordialement,

Tony Reix

ATOS / Bull SAS
ATOS Expert
IBM Coop Architect & Technical Leader
Office : +33 (0) 4 76 29 72 67
1 rue de Provence - 38432 Échirolles - France
www.atos.net

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2018-03-02 14:09:33 Re: TO_DATE Function unintended behavior when month value is greater than 12
Previous Message Magnus Hagander 2018-03-02 11:42:31 Re: BUG #15065: ActivePerl 5.24.3 breaks PG compilation on Windows