Re: vacuum analyze fails: ERROR: Unable to locate type oid 2230924 in catalog - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: vacuum analyze fails: ERROR: Unable to locate type oid 2230924 in catalog
Date
Msg-id 20010227131913S.t-ishii@sra.co.jp
Whole thread Raw
In response to Re: vacuum analyze fails: ERROR: Unable to locate type oid 2230924 in catalog  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: vacuum analyze fails: ERROR: Unable to locate type oid 2230924 in catalog  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> I'd suggest not arbitrarily erroring out when there is no need for
> a conversion, and not doing the cache lookup implied by typeidIsValid
> when it's not necessary to touch the type at all.  Hence, I'd recommend
> moving this down a few lines.  Also, conform to the surrounding coding
> style and add a comment:

Thanks for the advice.

>         /* don't know what to do for the input type? then quit... */
>         if (inputTypeId == InvalidOid)
>             return false;
> 
> +        /* don't choke on references to no-longer-existing types */
> +         if (!typeidIsValid(inputTypeId))
> +             return false;
> + 
> +         if (!typeidIsValid(targetTypeId))
> +             return false;

I thought "typeidIsValid(targetTypeId) == false" is better than
"!typeidIsValid(targetTypeId)"?

> BTW, is this sufficient to prevent the VACUUM failure, or are there more
> problems downstream?

The patches fix the particular case. However I'm not sure there is no
lurking problem.
--
Tatsuo Ishii


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re[2]: Re: [PATCHES] A patch for xlog.c
Next
From: The Hermit Hacker
Date:
Subject: Re: Re[2]: Re: [PATCHES] A patch for xlog.c