Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqiP5-00081G-5p for pgsql-bugs@arkaria.postgresql.org; Wed, 22 Mar 2017 15:42:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cqiP4-0004L0-P0 for pgsql-bugs@arkaria.postgresql.org; Wed, 22 Mar 2017 15:42:26 +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_2) (envelope-from ) id 1cqiOO-00035V-05 for pgsql-bugs@postgresql.org; Wed, 22 Mar 2017 15:41:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cqiOL-0007zc-0x for pgsql-bugs@postgresql.org; Wed, 22 Mar 2017 15:41:43 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v2MFfb6G000964; Wed, 22 Mar 2017 11:41:37 -0400 From: Tom Lane To: "David G. Johnston" cc: rasmus@mindplay.dk, "pgsql-bugs@postgresql.org" Subject: Re: BUG #14596: False primary/unique key constraint violations In-reply-to: References: <20170322123053.1421.55154@wrigleys.postgresql.org> <31317.1490193907@sss.pgh.pa.us> Comments: In-reply-to "David G. Johnston" message dated "Wed, 22 Mar 2017 08:31:49 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <962.1490197297.1@sss.pgh.pa.us> Date: Wed, 22 Mar 2017 11:41:37 -0400 Message-ID: <963.1490197297@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 "David G. Johnston" writes: > On Wed, Mar 22, 2017 at 7:45 AM, Tom Lane wrote: >> ... Be aware that this can be >> significantly slower than immediate uniqueness checking. > Given that the default SET CONSTRAINT behavior is IMMEDIATE, and that > triggers are defined DEFERRABLE, what harm would there be to default to the > standard mandated behavior noted above? The performance hit is one very large problem. Another is that we don't support using deferrable indexes for purposes such as foreign keys, which means that create table x (f1 int primary key); create table y (f1 int references x); would fail if "primary key" defaulted to meaning "deferrable". So the standards noncompliance would just move somewhere else. 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