Re: pg_dump crash

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marek Pętlicki <marpet(at)buy(dot)pl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_dump crash
Date: 2001-02-07 00:35:14
Message-ID: 26527.981506114@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?iso-8859-2?Q?Marek_P=EAtlicki?= <marpet(at)buy(dot)pl> writes:
> Hi, I have just received this crash on pg_dump:
> PQgetvalue: ERROR! tuple number 0 is out of range 0..-1
> Segmentation fault

IIRC, this is the symptom of a known bug in pg_dump: in some places it
does a SELECT and just blithely assumes that it will get a tuple back.
If there's no matching tuple, kaboom! You've probably got something
like a function with no owner in your database.

To determine exactly what's going on, run pg_dump with PGOPTIONS=-d2, ie
export PGOPTIONS="-d2"
pg_dump ...
and look at the postmaster's log file (you are keeping a log file I trust)
to see what the last few queries are. This should let you track down
where the missing reference is, and then you can delete the broken
database item. If you need help interpreting the info, send along
the last few queries...

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-02-07 00:41:59 Re: selecting a random record
Previous Message Alfonso Peniche 2001-02-07 00:33:15 Select in function?