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

Re: BUG #5288: Restoring a 7.4.5 -Fc dump using -j 2 segfaults (patch included)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jon Erdman <postgresql(at)thewickedtribe(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5288: Restoring a 7.4.5 -Fc dump using -j 2 segfaults (patch included)
Date: 2010-01-19 18:17:46
Message-ID: 14479.1263925066@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Jon Erdman <postgresql(at)thewickedtribe(dot)net> writes:
> Tom Lane wrote:
>> It seems like a good idea to put a range check into that loop as well,
>> but I think it should throw error not silently ignore bad data ...

> If things can be referenced that are not even in the dump, wouldn't it
> be somewhat likely that the dependency dumpId could be outside the range
> of Ids found in the TOC (and thus outside the range of the array,
> requiring a range check)?

Yeah, after looking at it further I concluded that you're right.
maxDumpId is only the highest dump ID actually found in the archive
--- I had been thinking it was transmitted by the originating pg_dump,
but it isn't.  So we do need to guard against out-of-range dependency
IDs too; this code could fail on partial archives as well as old ones.

The partial archive case is a bit scary, because there might be indirect
dependencies we don't know about.  It might be best to throw an error,
but for the moment I'll just make it ignore the dependency to the
missing object and we'll see if anyone complains.

> Mind if I take a crack at this patch?

I already did it before seeing your mail ...

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Chris TraversDate: 2010-01-19 18:37:49
Subject: Re: BUG #5288: Restoring a 7.4.5 -Fc dump using -j 2 segfaults (patch included)
Previous:From: Jon ErdmanDate: 2010-01-19 18:01:40
Subject: Re: BUG #5288: Restoring a 7.4.5 -Fc dump using -j 2 segfaults (patch included)

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