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

Re: Null records in pg_operator

From: "Sandeep Agarwal" <sandeepagarwal(dot)1980(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Null records in pg_operator
Date: 2007-09-20 11:26:46
Message-ID: 7e507c800709200426k355af87bq1fc8af08f1c7a3d2@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
On 9/19/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Sandeep Agarwal" <sandeepagarwal(dot)1980(at)gmail(dot)com> writes:
> > After googlging about the issue and checking the pg_catalogs i found
> > that pg_operator is having two null records
>
> > # /usr/local/pgsql/bin/psql -U postgres  -d ihm
> > ihm=# select * from pg_operator where oprnamespace is null;
> >  oprname | oprnamespace | oprowner | oprkind | oprcanhash | oprleft |
> > oprright | oprresult | oprcom | oprnegate | oprlsortop | oprrsortop |
> > oprltcmpop | oprgtcmpop | oprcode | oprrest | oprjoin
> > ---------+--------------+----------+---------+------------+---------+----------+-----------+--------+-----------+------------+------------+------------+------------+---------+---------+---------
> >          |              |          |         |            |         |
> >         |           |        |           |            |            |
> >          |            |         |         |
> >          |              |          |         |            |         |
> >         |           |        |           |            |            |
> >          |            |         |         |
> > (2 rows)
>
> You've got a badly corrupted table there :-(  pg_filedump might yield
> some clues as to what happened, but what you'll probably ultimately
> have to do is try to copy the pg_operator data over from an undamaged
> database in the same cluster.  I'd suggest a dump and reload as soon
> as you can get a clean pg_dump --- with something like this, I always
> wonder what else has been tromped on.
how can i copy contents from pg_operator of some other db on to this
in the same cluster. I tried deleting all records which is giving
error and i dont know any way to drop a system catalog table and
recreate it.

I am not a db guy, can someone please guide me how to use pg_filedump
for this specific db, i.e. how to look that what files in the data
directory are ment for the corrupted table/database.
>
> As far as preventing it from happening again:
> * are you on the latest minor release for your version of Postgres?
> (This doesn't look like any bug I know of, but it's still good advice)
> * are you running an up-to-date kernel?
> * try running memory and disk diagnostics to see if you've got
> flaky hardware.
>
> If I had to bet with no more info, I'd bet on kernel bugs first and
> flaky RAM second.
I am on kernel version 2.4, Redhat 8.0, are there some known issues with this ?

>                         regards, tom lane
>

thanks

Sandeep

In response to

Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2007-09-20 13:59:59
Subject: Re: Null records in pg_operator
Previous:From: Chris BrowneDate: 2007-09-19 21:51:19
Subject: Re: ON INSERT => execute AWK/SH/EXE?

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