Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XjbYM-0000Na-Fn for pgsql-bugs@arkaria.postgresql.org; Wed, 29 Oct 2014 22:17:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XjbYL-0006MA-HQ for pgsql-bugs@arkaria.postgresql.org; Wed, 29 Oct 2014 22:17:17 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XjbXE-0006JO-Vq for pgsql-bugs@postgresql.org; Wed, 29 Oct 2014 22:16:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XjbX7-00004s-Sd for pgsql-bugs@postgresql.org; Wed, 29 Oct 2014 22:16:07 +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 s9TMFxfL026020; Wed, 29 Oct 2014 18:15:59 -0400 From: Tom Lane To: cg@osss.net cc: pgsql-bugs@postgresql.org Subject: Re: BUG #11638: Transaction safety fails when constraints are dropped and analyze is done In-reply-to: <20141010181433.25463.5856@wrigleys.postgresql.org> References: <20141010181433.25463.5856@wrigleys.postgresql.org> Comments: In-reply-to cg@osss.net message dated "Fri, 10 Oct 2014 18:14:33 -0000" Date: Wed, 29 Oct 2014 18:15:59 -0400 Message-ID: <26019.1414620959@sss.pgh.pa.us> X-Pg-Spam-Score: -2.5 (--) 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 cg@osss.net writes: > When, within a transaction: > * I drop a foreign key (or any) constraint. > * Load some data to the table which won't fit the constraint. > * Analyze the table. > * Attempt to re-add the constraint which fails and should roll back the > whole transaction. > The constraint is still missing after rollback. > If I take out the analyze step, it works as expected. Fix committed, many thanks for chasing this down to the point of having a reproducible case! I imagine this was a real bear to pinpoint. 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