Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZHRv4-0005I0-WD for pgsql-bugs@arkaria.postgresql.org; Tue, 21 Jul 2015 07:24:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZHRv4-0007Cm-Ia for pgsql-bugs@arkaria.postgresql.org; Tue, 21 Jul 2015 07:24:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZHLbQ-00007Q-8n for pgsql-bugs@postgresql.org; Tue, 21 Jul 2015 00:40:12 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZHLbI-0002G1-3E for pgsql-bugs@postgresql.org; Tue, 21 Jul 2015 00:40:10 +0000 MIME-Version: 1.0 Subject: BUG #13507: INSERT into tables with SERIAL primary keys failing about half of the time To: pgsql-bugs@postgresql.org From: dsrich@dsrich.net Date: Tue, 21 Jul 2015 00:39:29 +0000 Message-ID: <20150721003929.9707.40340@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 13507 Logged by: David Richardson Email address: dsrich@dsrich.net PostgreSQL version: 9.3.9 Operating system: Ubuntu 14.04 Description: Table: CREATE TABLE payees ( payeenum serial NOT NULL, payeename character varying(127) NOT NULL, remarks text, CONSTRAINT payees_pkey PRIMARY KEY (payeenum), CONSTRAINT payees_payeename_key UNIQUE (payeename) ) WITH ( OIDS=FALSE ); ALTER TABLE payees OWNER TO dsrich; GRANT ALL ON TABLE payees TO dsrich; GRANT ALL ON TABLE payees TO users; Insert query: INSERT INTO payees (payeename, remarks) VALUES ('some string', 'some other string') This query (and three other versions using DEFAULT and 'RETURNING payeenum' clauses) fails about half the time with payees_pkey constraint violation. There is nothing else going on in the database server, and the failure occurs both when the query comes through Npgsql (where I first saw this) and through pgAdmin. The same database has another table with the same basic structure that also has the same problem. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs