Table Drop Error

Поиск
Список
Период
Сортировка
Искать

Table Drop Error

От:
<soumik.bhattacharjee@kpn.com>
Дата:

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

RE: Table Drop Error

От:
<soumik.bhattacharjee@kpn.com>
Дата:

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

RE: Table Drop Error

От:
<soumik.bhattacharjee@kpn.com>
Дата:

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

Re: Table Drop Error

От:
Pepe TD Vo <pepevo@yahoo.com>
Дата:
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 n
on 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:


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


RE: Table Drop Error

От:
<soumik.bhattacharjee@kpn.com>
Дата:

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

Re: Table Drop Error

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
 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

RE: Table Drop Error

От:
<soumik.bhattacharjee@kpn.com>
Дата:
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  
Sent: Friday, February 15, 2019 5:03 PM
To: Bhattacharjee, Soumik 
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Table Drop Error

 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

Re: Table Drop Error

От:
Laurenz Albe <laurenz.albe@cybertec.at>
Дата:
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


RE: Table Drop Error

От:
<soumik.bhattacharjee@kpn.com>
Дата:
But what is the solution in this case?

-----Original Message-----
From: Laurenz Albe  
Sent: Sunday, February 17, 2019 8:35 PM
To: Bhattacharjee, Soumik ; tgl@sss.pgh.pa.us
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Table Drop Error

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

Re: Table Drop Error

От:
Laurenz Albe <laurenz.albe@cybertec.at>
Дата:
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


FAQ