pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedsanity check fails
3+ messages / 2 participants
[nested] [flat]
* sanity check fails
@ 2000-05-15 12:55 Johann Spies <jhspies@adept.co.za>
0 siblings, 1 reply; 3+ messages in thread
From: Johann Spies @ 2000-05-15 12:55 UTC (permalink / raw)
To: pgsql-sql
When I try to backup my database using pg_dump I get the following error:
-- dumping out user-defined functions
failed sanity check, type with oid 96867 was not found
How can I correct that?
I am using Postgresql 6.5.1
Johann
--
J.H. Spies, Hugenotestraat 29, Posbus 80, Franschhoek, 7690, South Africa
Tel/Faks 021-876-2337 Sel/Cell 082 898 1528(Johann) 082 255 2388(Hester)
"Let not your heart be troubled: ye believe in God,
believe also in me." John 14:1
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: sanity check fails
@ 2000-05-16 04:49 Tom Lane <tgl@sss.pgh.pa.us>
parent: Johann Spies <jhspies@adept.co.za>
0 siblings, 0 replies; 3+ messages in thread
From: Tom Lane @ 2000-05-16 04:49 UTC (permalink / raw)
To: Johann Spies <jhspies@adept.co.za>; +Cc: pgsql-sql
Johann Spies <jhspies@adept.co.za> writes:
> When I try to backup my database using pg_dump I get the following error:
> -- dumping out user-defined functions
> failed sanity check, type with oid 96867 was not found
> How can I correct that?
It sounds like you had a user-defined type that you deleted without
first having deleted all the functions that accepted or returned that
type. You can look for the culprit function with
select * from pg_proc where prorettype = 96867 or
pg_proc.proargtypes[0] = 96867 or
pg_proc.proargtypes[1] = 96867 or
...
pg_proc.proargtypes[7] = 96867;
Some room for improvement here, obviously: pg_dump ought to identify
where it found the dangling type reference, and even better you
shouldn't be able to drop a still-referenced type in the first place...
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: sanity check fails
@ 2000-05-16 08:51 Johann Spies <jhspies@adept.co.za>
0 siblings, 0 replies; 3+ messages in thread
From: Johann Spies @ 2000-05-16 08:51 UTC (permalink / raw)
To: pgsql-sql
Thanks Tom.
On Tue, May 16, 2000 at 12:49:33AM -0400, Tom Lane wrote:
> Johann Spies <jhspies@adept.co.za> writes:
> > When I try to backup my database using pg_dump I get the following error:
> > -- dumping out user-defined functions
> > failed sanity check, type with oid 96867 was not found
> > How can I correct that?
>
> It sounds like you had a user-defined type that you deleted without
> first having deleted all the functions that accepted or returned that
> type. You can look for the culprit function with
>
> select * from pg_proc where prorettype = 96867 or
> pg_proc.proargtypes[0] = 96867 or
> pg_proc.proargtypes[1] = 96867 or
> ...
> pg_proc.proargtypes[7] = 96867;
>
The output was
proname |proowner|prolang|proisinh|proistrusted|proiscachable|pronargs|proretset|prorettype| proargtypes|probyte_pct|properbyte_cpu|propercall_cpu|prooutin_ratio|prosrc |probin
-------------+--------+-------+--------+------------+-------------+--------+---------+----------+-------------------+-----------+--------------+--------------+--------------+------------------------------+------
double_salary| 513726| 14|f |t |f | 1|f
| 23|96867 0 0 0 0 0 0 0| 100| 0| 0|
100|SELECT $1.salary * 2 AS salary|-
(1 row)
I do not understand the output. It seems to refer to some left-overs
of a tutorial I ran some time ago. I have removed all the remaining
tables of that tutorial. But how can I get a list of user defined
functions? Doing a \df in psql results in an output of more that 900
lines.
Johann
--
J.H. Spies, Hugenotestraat 29, Posbus 80, Franschhoek, 7690, South Africa
Tel/Faks 021-876-2337 Sel/Cell 082 898 1528(Johann) 082 255 2388(Hester)
"In my Father's house are many mansions: if it were not
so, I would have told you. I go to prepare a place for
you. And if I go and prepare a place for you, I will
come again, and receive you unto myself; that where I
am, there ye may be also." John 14:2,3
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2000-05-16 08:51 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-05-15 12:55 sanity check fails Johann Spies <jhspies@adept.co.za>
2000-05-16 04:49 ` Tom Lane <tgl@sss.pgh.pa.us>
2000-05-16 08:51 Re: sanity check fails Johann Spies <jhspies@adept.co.za>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox