BUG #13860: Duplicated primary key

Started by Baso10 Devover 10 years ago5 messagesbugs
Jump to latest
#1Baso10 Dev
baso10dev@gmail.com

The following bug has been logged on the website:

Bug reference: 13860
Logged by: baso10
Email address: baso10dev@gmail.com
PostgreSQL version: 9.4.5
Operating system: Debian 4.9.2-10 64-bit
Description:

Table has duplicated values in primary key column.

I have a table A.
I have created table B that inherits table A.

After playing around I noticed there are duplicate keys in table A.

Thanks

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#2David G. Johnston
david.g.johnston@gmail.com
In reply to: Baso10 Dev (#1)
Re: BUG #13860: Duplicated primary key

On Mon, Jan 11, 2016 at 3:34 PM, <baso10dev@gmail.com> wrote:

The following bug has been logged on the website:

Bug reference: 13860
Logged by: baso10
Email address: baso10dev@gmail.com
PostgreSQL version: 9.4.5
Operating system: Debian 4.9.2-10 64-bit
Description:

Table has duplicated values in primary key column.

I have a table A.
I have created table B that inherits table A.

After playing around I noticed there are duplicate keys in table A

​Please ponder for a moment how anyone would be able to help you solely
based upon the information you've provided.

If you need help figuring out what other information you should supply
please read the following.

http://www.postgresql.org/docs/current/static/bug-reporting.html

David J.

#3John R Pierce
pierce@hogranch.com
In reply to: Baso10 Dev (#1)
Re: BUG #13860: Duplicated primary key

On 1/11/2016 2:34 PM, baso10dev@gmail.com wrote:

The following bug has been logged on the website:

Bug reference: 13860
Logged by: baso10
Email address:baso10dev@gmail.com
PostgreSQL version: 9.4.5
Operating system: Debian 4.9.2-10 64-bit
Description:

Table has duplicated values in primary key column.

I have a table A.
I have created table B that inherits table A.

After playing around I noticed there are duplicate keys in table A.

Thanks

thats not exactly a reproducible bug as reported. Its also a 'should
never happen' sort of thing, about the only way I can see it happening
is if the primary key index somehow got corrupted (typically due to
hardware problems).

(do note, I'm just a fellow user, not a member of the PG core team or
anything... please reply to the pgsql-bugs list rather than me directly).

--
john r pierce, recycling bits in santa cruz

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Baso10 Dev (#1)
Re: BUG #13860: Duplicated primary key

baso10dev@gmail.com writes:

I have a table A.
I have created table B that inherits table A.
After playing around I noticed there are duplicate keys in table A.

Most likely, what you're seeing is the behavior described in

http://www.postgresql.org/docs/9.4/static/ddl-inherit.html#DDL-INHERIT-CAVEATS

specifically that a unique constraint on A doesn't apply to B nor
vice versa.

If that's not it, we're going to need a concrete example.

regards, tom lane

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#5Baso10 Dev
baso10dev@gmail.com
In reply to: Tom Lane (#4)
Re: BUG #13860: Duplicated primary key

Yes, I am seeing behaviour like in the link. I guess it is not a bug then.

Regards,
Domen

2016-01-12 1:39 GMT+02:00 Tom Lane <tgl@sss.pgh.pa.us>:

Show quoted text

baso10dev@gmail.com writes:

I have a table A.
I have created table B that inherits table A.
After playing around I noticed there are duplicate keys in table A.

Most likely, what you're seeing is the behavior described in

http://www.postgresql.org/docs/9.4/static/ddl-inherit.html#DDL-INHERIT-CAVEATS

specifically that a unique constraint on A doesn't apply to B nor
vice versa.

If that's not it, we're going to need a concrete example.

regards, tom lane