pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Gordon Ross <G.Ross@ccw.gov.uk>
Cc: pgsql-admin@postgresql.org
Subject: Re: Problems dumping database from 7.3.1
Date: Wed, 12 May 2004 15:35:44 -0400
Message-ID: <27733.1084390544@sss.pgh.pa.us> (raw)
In-Reply-To: <s0a26bd8.082@groupwise.ccw.gov.uk>
References: <s0a26bd8.082@groupwise.ccw.gov.uk>

"Gordon Ross" <G.Ross@ccw.gov.uk> writes:
> switchboards=# select * from "DNOwner";
> server closed the connection unexpectedly

> The DNOwner table is the base table. There are other tables that inherit from this table, and doing a simple select on those produce the same result.

Hmm.  Does 'select * from only "DNOwner";' work, by any chance?

I have a suspicion now that you were bit by the bug repaired in this
7.3.2 bug fix:

2003-01-04 19:56  tgl

	* src/backend/optimizer/prep/prepunion.c (REL7_3_STABLE): Fix
	inherited UPDATE for cases where child column numbering doesn't
	match parent table.  This used to work, but was broken in 7.3 by
	rearrangement of code that handles targetlist sorting.	Add a
	regression test to catch future breakage.

What I am thinking happened is that you did an 'UPDATE "DNOwner"' to
insert values for the new column, and that because of the aforesaid
bug, the updates of the child tables actually corrupted the data (by
storing the intended new dnid value into the wrong column position).
The crash is probably happening because SELECT is trying to interpret
an integer as a text field, or something along that line.

If that theory is correct, then the parent table should still be okay
(thus the request to try an ONLY select).  However, I'm afraid all your
child tables are toast, or at least all the rows you updated this way
are toast.  You could maybe get to a dumpable state by deleting all the
child rows, but if the DELETE crashes then you'll have little recourse
but to drop the child tables completely.

Updating Postgres to 7.3.2 or later will prevent fresh occurrences of
the same problem, but unfortunately won't bring back your old data :-(.
I hope you have backups ...

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <27733.1084390544@sss.pgh.pa.us>
Permalink:  ../27733.1084390544@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27733.1084390544@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, G.Ross@ccw.gov.uk
  Subject: Re: Problems dumping database from 7.3.1
  In-Reply-To: <27733.1084390544@sss.pgh.pa.us>
  References: <s0a26bd8.082@groupwise.ccw.gov.uk> <27733.1084390544@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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