Skip site navigation (1) Skip section navigation (2)

vacuum analyze fails: ERROR: Unable to locate type oid 2230924 in catalog

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: vacuum analyze fails: ERROR: Unable to locate type oid 2230924 in catalog
Date: 2001-02-27 03:41:12
Message-ID: 20010227124112U.t-ishii@sra.co.jp (view raw or flat)
Thread:
Lists: pgsql-hackers
vacuum analyze on pg_type fails if bogus entries remain in pg_operator.
Here is a sample script to reproduce the problem.

drop table t1;
create table t1(i int);
drop function foo(t1,t1);
create function foo(t1,t1) returns bool as 'select true' language 'sql';
create operator = (
	leftarg = t1,
	rightarg = t1,
	commutator = =,
	procedure = foo
	);
drop table t1;
vacuum analyze;

To fix the problem I propose following patches. Comments?
--
Tatsuo Ishii

*** parse_coerce.c.orig	Sat Feb  3 20:07:53 2001
--- parse_coerce.c	Tue Feb 27 11:33:01 2001
***************
*** 190,195 ****
--- 190,201 ----
  		Oid			inputTypeId = input_typeids[i];
  		Oid			targetTypeId = func_typeids[i];
  
+ 		if (typeidIsValid(inputTypeId) == false)
+ 		    return(false);
+ 
+ 		if (typeidIsValid(targetTypeId) == false)
+ 		    return(false);
+ 
  		/* no problem if same type */
  		if (inputTypeId == targetTypeId)
  			continue;

Responses

pgsql-hackers by date

Next:From: The Hermit HackerDate: 2001-02-27 03:41:30
Subject: Re[3]: Re: [PATCHES] A patch for xlog.c
Previous:From: jamexuDate: 2001-02-27 03:18:34
Subject: Re[3]: Re: [PATCHES] A patch for xlog.c

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group