Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id B7827B5DBD9 for ; Wed, 5 Oct 2011 11:58:06 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 73175-07 for ; Wed, 5 Oct 2011 14:58:00 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from lists.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id 02406B5DBC8 for ; Wed, 5 Oct 2011 11:57:59 -0300 (ADT) Received: from perhan.alvh.no-ip.org (spinlock.commandprompt.com.commandprompt.com [207.173.203.215]) by lists.commandprompt.com (Postfix) with ESMTPA id 04AB534C39D; Wed, 5 Oct 2011 07:57:57 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([200.126.68.131] helo=perhan.alvh.no-ip.org) by assp.commandprompt.com with ESMTP (2.0.1); 5 Oct 2011 07:57:55 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 885BE6E390; Wed, 5 Oct 2011 11:57:54 -0300 (CLST) Content-Type: text/plain; charset=UTF-8 Cc: Pg Bugs Subject: Re: BUG #6226: Broken foreign key stored on database (parent deleted with children still readable, BUG#6225 Update) From: Alvaro Herrera To: Daniel Cristian Cruz In-reply-to: References: <201109261829.p8QITXaZ017828@wwwmaster.postgresql.org> <1317067677-sup-8297@alvh.no-ip.org> Date: Wed, 05 Oct 2011 11:57:54 -0300 Message-Id: <1317826416-sup-836@alvh.no-ip.org> User-Agent: Sup/git Content-Transfer-Encoding: 8bit X-Assp-Version: 2.0.1(3.2.15) on assp.commandprompt.com X-Assp-Client-TLS: yes X-Assp-ID: assp.commandprompt.com m1-26677-11890 X-Assp-Original-Subject: Re: [BUGS] BUG #6226: Broken foreign key stored on database (parent deleted with children still readable, BUG#6225 Update) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201110/48 X-Sequence-Number: 31318 Excerpts from Daniel Cristian Cruz's message of mié oct 05 10:00:36 -0300 2011: > 2011/9/26 Alvaro Herrera > > > > > Please see if bug #6123 applies to this case. > > http://www.mail-archive.com/pgsql-hackers@postgresql.org/msg181541.html > > > I guess, yes, it's related, because we had a trigger that deletes a row, > while other foreign key constraint is updating the row setting null. > > But the thread is almost a book, and I am confused. It's a bug or do I need > to change my schema? Well, some people say it's a bug, others say it's not; and even if it is, changing it means backwards incompatible behavior, so *if* it is patched, it will only change the behavior on a future release, not whatever you're using. > Where can I change it to avoid it? I don't know enough about the problem to help you there, sorry. -- Álvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support