Thread: pg_dump errors

pg_dump errors

From
Kevin Kempter
Date:
Hi all;

I'm seeing these errors when running a pg_dump of the postgres database:

Running: [pg_dump --schema-only postgres > postgres.ddl]
pg_dump: SQL command failed
pg_dump: Error message from server: ERROR:  could not find hash function for
hash operator 33639
pg_dump: The command was: SELECT a.attnum, a.attname, a.atttypmod,
a.attstattarget, a.attstorage, t.typstorage, a.attnotnull, a.atthasdef,
a.attisdropped, a.attlen, a.attalign, a.attislocal,
pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname FROM
pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t ON a.atttypid =
t.oid WHERE a.attrelid = '34093'::pg_catalog.oid AND a.attnum >
0::pg_catalog.int2 ORDER BY a.attrelid, a.attnum


Running: [pg_dump --data-only  postgres > postgres.dat]
pg_dump: SQL command failed
pg_dump: Error message from server: ERROR:  could not find hash function for
hash operator 33639
pg_dump: The command was: SELECT a.attnum, a.attname, a.atttypmod,
a.attstattarget, a.attstorage, t.typstorage, a.attnotnull, a.atthasdef,
a.attisdropped, a.attlen, a.attalign, a.attislocal,
pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname FROM
pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t ON a.atttypid =
t.oid WHERE a.attrelid = '34093'::pg_catalog.oid AND a.attnum >
0::pg_catalog.int2 ORDER BY a.attrelid, a.attnum


thoughts? (I'm on Version 8.4.3)


thanks in advance

Re: pg_dump errors

From
Tom Lane
Date:
Kevin Kempter <kevink@consistentstate.com> writes:
> pg_dump: Error message from server: ERROR:  could not find hash function for
> hash operator 33639

Bizarre ... that command really oughtn't be invoking any non-builtin
operator, but the OID is too high for a builtin.  What do you get from
"select 33639::regoperator"?

            regards, tom lane

Re: pg_dump errors

From
Kevin Kempter
Date:
On Thursday 03 June 2010 11:18, Tom Lane wrote:
> Kevin Kempter <kevink@consistentstate.com> writes:
> > pg_dump: Error message from server: ERROR:  could not find hash function
> > for hash operator 33639
>
> Bizarre ... that command really oughtn't be invoking any non-builtin
> operator, but the OID is too high for a builtin.  What do you get from
> "select 33639::regoperator"?
>
>             regards, tom lane


postgres=# select 33639::regoperator
postgres-# ;
  regoperator
----------------
 abc.=(oid,oid)
(1 row)

Re: pg_dump errors

From
Tom Lane
Date:
Kevin Kempter <kevink@consistentstate.com> writes:
> On Thursday 03 June 2010 11:18, Tom Lane wrote:
>> Bizarre ... that command really oughtn't be invoking any non-builtin
>> operator, but the OID is too high for a builtin.  What do you get from
>> "select 33639::regoperator"?

> postgres=# select 33639::regoperator
> postgres-# ;
>   regoperator
> ----------------
>  abc.=(oid,oid)
> (1 row)

So where did that come from, and why is it defined incorrectly?
(Evidently it's marked oprcanhash but there is no associated hash
opclass.)  I can hardly see a reason to define your own oid equality
operator, much less a wrong one ...

            regards, tom lane

Re: pg_dump errors

From
Kevin Kempter
Date:
On Thursday 03 June 2010 11:45, Tom Lane wrote:
> Kevin Kempter <kevink@consistentstate.com> writes:
> > On Thursday 03 June 2010 11:18, Tom Lane wrote:
> >> Bizarre ... that command really oughtn't be invoking any non-builtin
> >> operator, but the OID is too high for a builtin.  What do you get from
> >> "select 33639::regoperator"?
> >
> > postgres=# select 33639::regoperator
> > postgres-# ;
> >   regoperator
> > ----------------
> >  abc.=(oid,oid)
> > (1 row)
>
> So where did that come from, and why is it defined incorrectly?
> (Evidently it's marked oprcanhash but there is no associated hash
> opclass.)  I can hardly see a reason to define your own oid equality
> operator, much less a wrong one ...
>
>             regards, tom lane


I dont know where it came from. I havent intentionally defined any classes, or
anything like this. However this is a dev instance so maybe something went
wrong at some point.