Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gvSDH-00046P-6I for pgsql-admin@arkaria.postgresql.org; Sun, 17 Feb 2019 19:34:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gvSDF-0001ti-Lc for pgsql-admin@arkaria.postgresql.org; Sun, 17 Feb 2019 19:34:53 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1gvSDF-0001tb-ED for pgsql-admin@lists.postgresql.org; Sun, 17 Feb 2019 19:34:53 +0000 Received: from mx2a.mailbox.org ([2001:67c:2050:104:0:2:25:2] helo=mx2.mailbox.org) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gvSDD-0002EI-54 for pgsql-admin@lists.postgresql.org; Sun, 17 Feb 2019 19:34:53 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 563CFA108E; Sun, 17 Feb 2019 20:34:48 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de [80.241.56.115]) (amavisd-new, port 10030) with ESMTP id PFsUVOqWxTK8; Sun, 17 Feb 2019 20:34:41 +0100 (CET) Message-ID: <10223d001b83afa185f5ec689b0cc6591c3fa15f.camel@cybertec.at> Subject: Re: Table Drop Error From: Laurenz Albe To: soumik.bhattacharjee@kpn.com, tgl@sss.pgh.pa.us Cc: pgsql-admin@lists.postgresql.org Date: Sun, 17 Feb 2019 20:34:40 +0100 In-Reply-To: <2A91BEF8171A5349931391E0C721CC531D6DB96D@CPEMS-KPN301.KPNCNL.LOCAL> References: <2A91BEF8171A5349931391E0C721CC531D6DB881@CPEMS-KPN301.KPNCNL.LOCAL> <3681.1550246571@sss.pgh.pa.us> <2A91BEF8171A5349931391E0C721CC531D6DB96D@CPEMS-KPN301.KPNCNL.LOCAL> Organization: Cybertec Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk soumik.bhattacharjee@kpn.com wrote: > From: Tom Lane > > writes: > > > # delete from pg_depend where objid=49179; DELETE 0 # delete from > > > pg_depend where objid=49179; DELETE 0 # DROP TABLE caprimeta.tcr_codes > > > CASCADE; > > > ERROR: cache lookup failed for relation 49179 > > > > It's not really a great idea to go dropping catalog rows without knowing exactly what you're doing, which I gather you don't. > > However ... are there pg_depend entries with refobjid=49179 ? > > Thanks for the mail, there is no entries in pg_depend as it returns " DELETE 0" > But the table is not getting dropped. Please read again. "refobjid=49179", not "objid=49179". Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com