OSDN Git Service

When doing a parallel restore, we must guard against out-of-range dependency
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 19 Jan 2010 18:39:19 +0000 (18:39 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 19 Jan 2010 18:39:19 +0000 (18:39 +0000)
commit16f2eadfab75c94da1be1803512c204b248da974
treed10341cdfb7496f738db2c0fb11e447d9f394b1f
parent85b587c259cae5f058019797243e38271ef7158d
When doing a parallel restore, we must guard against out-of-range dependency
dump IDs, because the array we're using is sized according to the highest
dump ID actually defined in the archive file.  In a partial dump there could
be references to higher dump IDs that weren't dumped.  Treat these the same
as references to in-range IDs that weren't dumped.  (The whole thing is a
bit scary because the missing objects might have been part of dependency
chains, which we won't know about.  Not much we can do though --- throwing
an error is probably overreaction.)

Also, reject parallel restore with pre-1.8 archive version (made by pre-8.0
pg_dump).  In these old versions the dependency entries are OIDs, not dump
IDs, and we don't have enough information to interpret them.

Per bug #5288 from Jon Erdman.
src/bin/pg_dump/pg_backup_archiver.c