Re: [HACKERS] pg_dump bug - problems along the way - Mailing list pgsql-hackers

From jwieck@debis.com (Jan Wieck)
Subject Re: [HACKERS] pg_dump bug - problems along the way
Date
Msg-id m0zi0Tl-000EBWC@orion.SAPserv.Hamburg.dsh.de
Whole thread Raw
In response to Re: [HACKERS] pg_dump bug - problems along the way  ("Oliver Elphick" <olly@lfix.co.uk>)
List pgsql-hackers
>
> Sferacarta Software wrote:
>   >Try this...it works...
>   >
>   >create function oid4smaller (oid, oid) returns oid as
>   >'
>   >begin
>   >     if $1 > $2 then
>   >        return $2;
>   >     else
>   >        return $1;
>   >     end if;
>   > end;
>   >' language 'plpgsql';
>
> I'm afraid it doesn't work for me; clearly the problem is elsewhere:
>
> bray=> select min(oid) from europe;
> ERROR:  fmgr_info: function 108994: cache lookup failed
>
> **Idea** - try in another database -- it works, so it must be a database
> corruption of some kind.

    Looks like you dropped and recreated the function used in the
    min(oid)  aggregate  without  dropping  and  recreating   the
    aggregate itself.

    Note  that  the functions used in an aggregate are referenced
    by OID, not by name.  In pg_aggregate the pg_proc tuple  with
    the  old  OID  is still referenced and cannot be found (cache
    lookup failed). Drop the agg and recreate it.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck@debis.com (Jan Wieck) #

pgsql-hackers by date:

Previous
From: jwieck@debis.com (Jan Wieck)
Date:
Subject: LIMIT patch available (was: Re: [SQL] MINUS and slow 'not in')
Next
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] 6.4.x