pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Table Drop Error
10+ messages / 4 participants
[nested] [flat]

* Table Drop Error
@ 2019-02-14 15:45  soumik.bhattacharjee@kpn.com
  0 siblings, 0 replies; 10+ messages in thread

From: soumik.bhattacharjee@kpn.com @ 2019-02-14 15:45 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org; +Cc: pgsql-admin@lists.postgresql.org

Hi All,

Any idea on this, it’s kind of stuck here for me.


# DROP TABLE caprimeta.tcr_codes CASCADE;

ERROR:  cache lookup failed for relation 49179


Thanks
Soumik


^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* RE: Table Drop Error
@ 2019-02-14 16:04  soumik.bhattacharjee@kpn.com
  0 siblings, 0 replies; 10+ messages in thread

From: soumik.bhattacharjee@kpn.com @ 2019-02-14 16:04 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org; +Cc: pgsql-admin@lists.postgresql.org

Its not moving ahead with drop.


# 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
#

From: Bhattacharjee, Soumik
Sent: Thursday, February 14, 2019 4:45 PM
To: pgsql-admin@lists.postgresql.org
Cc: pgsql-admin@lists.postgresql.org
Subject: Table Drop Error

Hi All,

Any idea on this, it’s kind of stuck here for me.


# DROP TABLE caprimeta.tcr_codes CASCADE;

ERROR:  cache lookup failed for relation 49179


Thanks
Soumik


^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* RE: Table Drop Error
@ 2019-02-14 16:51  soumik.bhattacharjee@kpn.com
  0 siblings, 0 replies; 10+ messages in thread

From: soumik.bhattacharjee@kpn.com @ 2019-02-14 16:51 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org; +Cc: pgsql-admin@lists.postgresql.org

A new line I got now.

# DROP TABLE caprimeta.tcr_codes CASCADE;
ERROR:  XX000: cache lookup failed for relation 49179
LOCATION:  heap_drop_with_catalog, heap.c:1773

From: Bhattacharjee, Soumik
Sent: Thursday, February 14, 2019 5:04 PM
To: 'pgsql-admin@lists.postgresql.org' <pgsql-admin@lists.postgresql.org>
Cc: 'pgsql-admin@lists.postgresql.org' <pgsql-admin@lists.postgresql.org>
Subject: RE: Table Drop Error

Its not moving ahead with drop.

# 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
#

From: Bhattacharjee, Soumik
Sent: Thursday, February 14, 2019 4:45 PM
To: pgsql-admin@lists.postgresql.org<mailto:pgsql-admin@lists.postgresql.org>
Cc: pgsql-admin@lists.postgresql.org<mailto:pgsql-admin@lists.postgresql.org>
Subject: Table Drop Error

Hi All,

Any idea on this, it’s kind of stuck here for me.


# DROP TABLE caprimeta.tcr_codes CASCADE;

ERROR:  cache lookup failed for relation 49179


Thanks
Soumik


^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Table Drop Error
@ 2019-02-14 17:19  Pepe TD Vo <pepevo@yahoo.com>
  0 siblings, 0 replies; 10+ messages in thread

From: Pepe TD Vo @ 2019-02-14 17:19 UTC (permalink / raw)
  To: soumik.bhattacharjee@kpn.com <soumik.bhattacharjee@kpn.com>; pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>

I think you have something link to that table.
I do have this issue before and I removed oid, objid and conrelid 1st before drop the table
do obtain oid of the table:
select oid from pg_class c join pg_namespace non n.oid = c.relnamespace where c.relname ='<table_name>' and n.nspname = '<schema name>';
then delete oid, objid and conrelid:
delete from pg_class where oid = <oid number>;delete from pg_depend where objid = <oid number>;delete from pg_constraint where conrelid = <oid number>;
finally drop your schema's table with cascade;
 Bach-Nga

No one in this world is pure and perfect.  If you avoid people for their mistakes you will be alone. So judge less, love and forgive more.To call him a dog hardly seems to do him justice though in as much as he had four legs, a tail, and barked, I admit he was, to all outward appearances. But to those who knew him well, he was a perfect gentleman (Hermione Gingold)
**Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely rich *** Faithful talent *** Sharing success 

    On Thursday, February 14, 2019 11:52 AM, "soumik.bhattacharjee@kpn.com" <soumik.bhattacharjee@kpn.com> wrote:
 

 #yiv7619060442 -- filtered {panose-1:2 4 5 3 5 4 6 3 2 4;}#yiv7619060442 filtered {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}#yiv7619060442 p.yiv7619060442MsoNormal, #yiv7619060442 li.yiv7619060442MsoNormal, #yiv7619060442 div.yiv7619060442MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;font-family:New serif;}#yiv7619060442 a:link, #yiv7619060442 span.yiv7619060442MsoHyperlink {color:blue;text-decoration:underline;}#yiv7619060442 a:visited, #yiv7619060442 span.yiv7619060442MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv7619060442 p.yiv7619060442msonormal0, #yiv7619060442 li.yiv7619060442msonormal0, #yiv7619060442 div.yiv7619060442msonormal0 {margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:New serif;}#yiv7619060442 span.yiv7619060442EmailStyle18 {font-family:sans-serif;color:#1F497D;}#yiv7619060442 span.yiv7619060442EmailStyle19 {font-family:sans-serif;color:#1F497D;}#yiv7619060442 span.yiv7619060442EmailStyle20 {font-family:sans-serif;color:#1F497D;}#yiv7619060442 .yiv7619060442MsoChpDefault {font-size:10.0pt;}#yiv7619060442 filtered {margin:70.85pt 70.85pt 70.85pt 70.85pt;}#yiv7619060442 div.yiv7619060442WordSection1 {}#yiv7619060442 A new line I got now.    # DROP TABLE caprimeta.tcr_codes CASCADE; ERROR:  XX000: cache lookup failed for relation 49179 LOCATION:  heap_drop_with_catalog, heap.c:1773    From: Bhattacharjee, Soumik
Sent: Thursday, February 14, 2019 5:04 PM
To: 'pgsql-admin@lists.postgresql.org' <pgsql-admin@lists.postgresql.org>
Cc: 'pgsql-admin@lists.postgresql.org' <pgsql-admin@lists.postgresql.org>
Subject: RE: Table Drop Error    Its not moving ahead with drop.    # 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 #    From: Bhattacharjee, Soumik
Sent: Thursday, February 14, 2019 4:45 PM
To: pgsql-admin@lists.postgresql.org
Cc: pgsql-admin@lists.postgresql.org
Subject: Table Drop Error    Hi All,    Any idea on this, it’s kind of stuck here for me.       # DROP TABLE caprimeta.tcr_codes CASCADE;    ERROR:  cache lookup failed for relation 49179       Thanks Soumik 

   

^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* RE: Table Drop Error
@ 2019-02-15 11:21  soumik.bhattacharjee@kpn.com
  0 siblings, 1 reply; 10+ messages in thread

From: soumik.bhattacharjee@kpn.com @ 2019-02-15 11:21 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org; +Cc: pgsql-admin@lists.postgresql.org

Hi All,

Anyone faced and solved below kind of issues?

Thanks
Soumik

From: Bhattacharjee, Soumik
Sent: Thursday, February 14, 2019 5:52 PM
To: 'pgsql-admin@lists.postgresql.org' <pgsql-admin@lists.postgresql.org>
Cc: 'pgsql-admin@lists.postgresql.org' <pgsql-admin@lists.postgresql.org>
Subject: RE: Table Drop Error

A new line I got now.

# DROP TABLE caprimeta.tcr_codes CASCADE;
ERROR:  XX000: cache lookup failed for relation 49179
LOCATION:  heap_drop_with_catalog, heap.c:1773

From: Bhattacharjee, Soumik
Sent: Thursday, February 14, 2019 5:04 PM
To: 'pgsql-admin@lists.postgresql.org' <pgsql-admin@lists.postgresql.org<mailto:pgsql-admin@lists.postgresql.org>>
Cc: 'pgsql-admin@lists.postgresql.org' <pgsql-admin@lists.postgresql.org<mailto:pgsql-admin@lists.postgresql.org>>
Subject: RE: Table Drop Error

Its not moving ahead with drop.

# 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
#

From: Bhattacharjee, Soumik
Sent: Thursday, February 14, 2019 4:45 PM
To: pgsql-admin@lists.postgresql.org<mailto:pgsql-admin@lists.postgresql.org>
Cc: pgsql-admin@lists.postgresql.org<mailto:pgsql-admin@lists.postgresql.org>
Subject: Table Drop Error

Hi All,

Any idea on this, it’s kind of stuck here for me.


# DROP TABLE caprimeta.tcr_codes CASCADE;

ERROR:  cache lookup failed for relation 49179


Thanks
Soumik


^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Table Drop Error
@ 2019-02-15 16:02  Tom Lane <tgl@sss.pgh.pa.us>
  parent: soumik.bhattacharjee@kpn.com
  0 siblings, 1 reply; 10+ messages in thread

From: Tom Lane @ 2019-02-15 16:02 UTC (permalink / raw)
  To: soumik.bhattacharjee@kpn.com; +Cc: pgsql-admin@lists.postgresql.org

<soumik.bhattacharjee@kpn.com> 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 ?

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* RE: Table Drop Error
@ 2019-02-15 16:22  soumik.bhattacharjee@kpn.com
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 10+ messages in thread

From: soumik.bhattacharjee@kpn.com @ 2019-02-15 16:22 UTC (permalink / raw)
  To: tgl@sss.pgh.pa.us; +Cc: pgsql-admin@lists.postgresql.org

Hi Tom,

Thanks for the mail, there is no entries in pg_depend as it returns " DELETE 0"

But the table is not getting dropped.

Thanks


-----Original Message-----
From: Tom Lane <tgl@sss.pgh.pa.us> 
Sent: Friday, February 15, 2019 5:03 PM
To: Bhattacharjee, Soumik <soumik.bhattacharjee@kpn.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Table Drop Error

<soumik.bhattacharjee@kpn.com> 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 ?

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Table Drop Error
@ 2019-02-17 19:34  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: soumik.bhattacharjee@kpn.com
  0 siblings, 1 reply; 10+ messages in thread

From: Laurenz Albe @ 2019-02-17 19:34 UTC (permalink / raw)
  To: soumik.bhattacharjee@kpn.com; tgl@sss.pgh.pa.us; +Cc: pgsql-admin@lists.postgresql.org

soumik.bhattacharjee@kpn.com wrote:
> From: Tom Lane <tgl@sss.pgh.pa.us> 
> > <soumik.bhattacharjee@kpn.com> 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





^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* RE: Table Drop Error
@ 2019-02-18 09:01  soumik.bhattacharjee@kpn.com
  parent: Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 1 reply; 10+ messages in thread

From: soumik.bhattacharjee@kpn.com @ 2019-02-18 09:01 UTC (permalink / raw)
  To: laurenz.albe@cybertec.at; tgl@sss.pgh.pa.us; +Cc: pgsql-admin@lists.postgresql.org

But what is the solution in this case?

-----Original Message-----
From: Laurenz Albe <laurenz.albe@cybertec.at> 
Sent: Sunday, February 17, 2019 8:35 PM
To: Bhattacharjee, Soumik <soumik.bhattacharjee@kpn.com>; tgl@sss.pgh.pa.us
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Table Drop Error

soumik.bhattacharjee@kpn.com wrote:
> From: Tom Lane <tgl@sss.pgh.pa.us>
> > <soumik.bhattacharjee@kpn.com> 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



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Table Drop Error
@ 2019-02-18 17:56  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: soumik.bhattacharjee@kpn.com
  0 siblings, 0 replies; 10+ messages in thread

From: Laurenz Albe @ 2019-02-18 17:56 UTC (permalink / raw)
  To: soumik.bhattacharjee@kpn.com; tgl@sss.pgh.pa.us; +Cc: pgsql-admin@lists.postgresql.org

soumik.bhattacharjee@kpn.com wrote:
> But what is the solution in this case?

Before we can come up with a solution, we have to understand the problem.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com





^ permalink  raw  reply  [nested|flat] 10+ messages in thread


end of thread, other threads:[~2019-02-18 17:56 UTC | newest]

Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-02-14 15:45 Table Drop Error soumik.bhattacharjee@kpn.com
2019-02-14 16:04 RE: Table Drop Error soumik.bhattacharjee@kpn.com
2019-02-14 16:51 RE: Table Drop Error soumik.bhattacharjee@kpn.com
2019-02-14 17:19 Re: Table Drop Error Pepe TD Vo <pepevo@yahoo.com>
2019-02-15 11:21 RE: Table Drop Error soumik.bhattacharjee@kpn.com
2019-02-15 16:02 ` Tom Lane <tgl@sss.pgh.pa.us>
2019-02-15 16:22   ` soumik.bhattacharjee@kpn.com
2019-02-17 19:34     ` Laurenz Albe <laurenz.albe@cybertec.at>
2019-02-18 09:01       ` soumik.bhattacharjee@kpn.com
2019-02-18 17:56         ` Laurenz Albe <laurenz.albe@cybertec.at>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox