From: | Carlos Henrique Reimer <carlos(dot)reimer(at)opendb(dot)com(dot)br> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | User function canceling VACUUMDB utility |
Date: | 2010-09-10 01:31:16 |
Message-ID: | AANLkTim6SVqY6EeUQjFuyt2W8LU8HoQ+f-UzFsC3RjPd@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
We are facing the following problem in a PG 8.2 server when trying to vacuum
one of our databases:
vacuumdb: vacuuming database "reimer"
INFO: vacuuming "pg_catalog.pg_database"
INFO: "pg_database": found 0 removable, 6 nonremovable row versions in 1
pages
INFO: index "pg_database_datname_index" now contains 6 row versions in 2
pages
INFO: index "pg_database_oid_index" now contains 6 row versions in 2 pages
INFO: "pg_database": moved 0 row versions, truncated 1 to 1 pages
INFO: analyzing "pg_catalog.pg_database"
INFO: "pg_database": scanned 1 of 1 pages, containing 6 live rows and 0
dead rows; 6 rows in sample, 6 estimated total rows
vacuumdb: vacuuming of database "reimer" failed: ERROR: invalid type name
"TT_TIT.SEQCAN%TYPE"
[root(at)serverdb backup]#
I dumped the database and found the following function using the
"TT_TIT.SEQCAN%TYPE" type name.
CREATE FUNCTION fn_uq_tit_rec_seqcan(character, character, character,
character) RETURNS character
AS $_$
DECLARE
pFILREC ALIAS FOR $1 ;
pSEQREC ALIAS FOR $2 ;
pPARREC ALIAS FOR $3 ;
pSEQCAN ALIAS FOR $4 ;
output VARCHAR(1000);
SEQCAN TT_TIT.SEQCAN%TYPE;
begin
IF pSEQCAN IS NULL THEN
SEQCAN := ProximoCodigo('TT_TIT',pFILREC);
END IF;
output := pFILREC||pSEQREC||pPARREC||COALESCE(pSEQCAN,SEQCAN);
return (output);
end;
$_$
LANGUAGE plpgsql IMMUTABLE;
If I drop the function the vacuumdb runs fine but I'm wondering how a
funciton can cancel the vacuumdb utility.
I'm not a function specialist but is there anything we can try to make
vacuumdb run with this function created?
Thank you!
--
Reimer
47-3347-1724 47-9183-0547 msn: carlos(dot)reimer(at)opendb(dot)com(dot)br
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2010-09-10 01:35:07 | Re: Dynamically update NEW columns in plpgsql trigger |
Previous Message | Jeff Davis | 2010-09-10 00:31:56 | Re: sql DO in rule 9.0rc1 |