Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fqirs-0000em-Rl for pgsql-bugs@arkaria.postgresql.org; Fri, 17 Aug 2018 17:49:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fqirp-0000LN-Nj for pgsql-bugs@arkaria.postgresql.org; Fri, 17 Aug 2018 17:48:57 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fqirp-0000LG-5U for pgsql-bugs@lists.postgresql.org; Fri, 17 Aug 2018 17:48:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fqiri-0003Ys-Dp for pgsql-bugs@postgresql.org; Fri, 17 Aug 2018 17:48:55 +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 w7HHmmeV009420; Fri, 17 Aug 2018 13:48:48 -0400 From: Tom Lane To: Nandakumar M cc: pgsql-bugs@postgresql.org Subject: Re: Row exists in a table that violates Foreign key constraint In-reply-to: References: Comments: In-reply-to Nandakumar M message dated "Fri, 17 Aug 2018 21:10:34 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9418.1534528128.1@sss.pgh.pa.us> Date: Fri, 17 Aug 2018 13:48:48 -0400 Message-ID: <9419.1534528128@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Nandakumar M writes: > I have a table with a FK constraint to another table. There exists one row > on the referring table with no corresponding row on the referred table. I > tried validating the constraint but that did not produce any errors. This > is on a older version of Postgres (9.2.4) 9.2.x is out of support; moreover, the last release in that series was 9.2.24, so you are missing a large number of bug fixes, including some known data-corruption hazards. If you can replicate this problem on an up-to-date Postgres release, we'd be quite interested, but nobody is likely to spend any effort looking into problems in 9.2.4. regards, tom lane