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

Re: [HACKERS] pg_dump bug - problems along the way

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: jwieck(at)debis(dot)com (Jan Wieck)
Cc: olly(at)lfix(dot)co(dot)uk (Oliver Elphick), sferac(at)bo(dot)nettuno(dot)it, hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] pg_dump bug - problems along the way
Date: 1998-11-23 19:50:06
Message-ID: 199811231950.TAA18089@linda.lfix.co.uk (view raw or flat)
Thread:
Lists: pgsql-hackers
Jan Wieck wrote:
  >> 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.

Yes; that is what I did, which explains why it works in another
database where I hadn't been playing.  Thank you.

May I suggest that the error message be changed from

  `ERROR:  fmgr_info: function 108994: cache lookup failed'

to:

  `ERROR:  fmgr_info: function 108994 not found in pg_proc'

which would be a better explanation of what was wrong, and would have
let me diagnose the problem for myself (I hope!).  The existing message
suggests that the function itself is present but somehow faulty.

(src/backend/utils/fmgr/fmgr.c in fmgr_info())

In general, is it not better to say as explicitly as possible what is
wrong, rather than to use terms like "cache lookup" which are only
meaningful to someone who knows the program internals?  There are several
other error messages in that same file which could do with similar
clarification.

-- 
Oliver Elphick                                Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight                              http://www.lfix.co.uk/oliver
               PGP key from public servers; key ID 32B8FAA1
                 ========================================
     "The LORD is nigh unto all them that call upon him, to
      all that call upon him in truth."        
                                   Psalms 145:18



pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-11-23 20:10:15
Subject: Re: [HACKERS] Parser bug?
Previous:From: Engard FerencDate: 1998-11-23 19:20:56
Subject: cursor and update + view

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