Bug #608: cache lookup failed

Поиск
Список
Период
Сортировка
От pgsql-bugs@postgresql.org
Тема Bug #608: cache lookup failed
Дата
Msg-id 20020306143310.8966147654E@postgresql.org
обсуждение исходный текст
Ответы Re: Bug #608: cache lookup failed  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Bug #608: cache lookup failed  (Juliano Ignacio <jsignacio@yahoo.com>)
Список pgsql-bugs
Laurent Faillie (l_faillie@yahoo.com) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
cache lookup failed

Long Description
Hi all,

I have just upgraded my 1.7.3 database to 7.2, following documentation's instruction (pg_dumpall + psql < dumpfile).

All is working Ok but a call to an PL/SQL function which fails w/ the following code.

ERROR:  fmgr_info: function 16594: cache lookup failed

I have tryed to drop and recreate this function but it fails again.

I need some help because this problem blocks all my production as most of my application depend on it :-(

I'm working on an HP-UX 11.0 box and postgresql was compiled using GCC 
2.95.3

Thank for your help

- Laurent

Sample Code
CREATE TABLE disk_toppage_stats (
    machine    TEXT,
    jour    DATE,
    pourcent    SMALLINT DEFAULT 0,
    level    SMALLINT DEFAULT    0
);


CREATE FUNCTION upd_disk_toppage_stats() RETURNS text AS '
DECLARE
    res RECORD;
    res2 RECORD;
    res_lmt RECORD;

    nv_vert    CONSTANT SMALLINT := 0;
    nv_jaune CONSTANT SMALLINT := 1;
    nv_rouge CONSTANT SMALLINT := 2;

        -- Default value for levels
    def_lmt_jaune    CONSTANT SMALLINT := 80;
    def_lmt_rouge    CONSTANT SMALLINT := 90;

    lmt_jaune    SMALLINT;
    lmt_rouge    SMALLINT;
    level    SMALLINT;
BEGIN

    FOR res IN select * from disk_toppage_stats LOOP
--        RAISE NOTICE ''machine = %, jour = %'',res.machine,res.jour;

--
--    Update the maximum percentage for each machine.
--
    
        EXECUTE ''UPDATE disk_toppage_stats SET pourcent=(select max(pourcent) FROM disk_space WHERE machine='' ||
quote_literal(res.machine)|| '' AND jour='' || quote_literal(res.jour) || '') WHERE machine='' ||
quote_literal(res.machine);


-- RAISE NOTICE ''------ machine=% -----'', res.machine;
        level := nv_vert;
        
        FOR res2 IN 
            select * from disk_space 
            where machine=res.machine
            and jour=(select jour from disk_toppage_stats where machine=res.machine)
        LOOP
-- RAISE NOTICE ''fs = %, prc = %'',res2.fs,res2.pourcent;

            lmt_jaune := def_lmt_jaune;
            lmt_rouge := def_lmt_rouge;
            
            SELECT INTO res_lmt * FROM disk_limit
                WHERE machine=res.machine AND fs=res2.fs;
            
            IF FOUND THEN
-- RAISE NOTICE ''****** TROUVE ! ******'';
                lmt_jaune := res_lmt.limite_jaune;
                lmt_rouge := res_lmt.limite_rouge;
            END IF;
            
            IF level = nv_vert THEN
                IF res2.pourcent >= lmt_jaune THEN
                    level := nv_jaune;
                END IF;
            END IF;
            
            IF res2.pourcent >= lmt_rouge THEN
                level := nv_rouge;
                EXIT;
            END IF;
        END LOOP;

        EXECUTE ''UPDATE disk_toppage_stats SET level='' || quote_literal(level) || '' WHERE machine='' ||
quote_literal(res.machine);
--RAISE NOTICE ''on est sortie avec un niveau %'',level;
    END LOOP;

    RETURN ''ok'';
END;

' LANGUAGE 'plpgsql';


No file was uploaded with this report

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Justin
Дата:
Сообщение: Re: postmaster problem....
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bug #608: cache lookup failed