Обсуждение: pg_restore -j
Hi,
I'm trying to use the -j option on pg_restore while restoring a database into PG 8.4.3.
The dump was executed on PG 8.3.7 (Windows, Server 2003) using:
This results in a ~3.4 GB dump file.
When I try to restore I'm using:
This results in an error:
The dump works fine if I omit the -j option. What am I doing wrong?
Thanks,
Justin
I'm trying to use the -j option on pg_restore while restoring a database into PG 8.4.3.
The dump was executed on PG 8.3.7 (Windows, Server 2003) using:
pg_dump -Fc -U postgres mydb > mydb.backup
This results in a ~3.4 GB dump file.
When I try to restore I'm using:
pg_restore -d mydb -U postgres -j 4 mydb.backup
This results in an error:
pg_restore: [custom archiver] dumping a specific TOC data block out of order not supported without ID on this input stream (fseek required)
The dump works fine if I omit the -j option. What am I doing wrong?
Thanks,
Justin
Justin Falk wrote: > Hi, > > I'm trying to use the -j option on pg_restore while restoring a database > into PG 8.4.3. > > The dump was executed on PG 8.3.7 (Windows, Server 2003) using: > > pg_dump -Fc -U postgres mydb > mydb.backup > > This results in a ~3.4 GB dump file. > > When I try to restore I'm using: > > pg_restore -d mydb -U postgres -j 4 mydb.backup > > This results in an error: > > pg_restore: [custom archiver] dumping a specific TOC data block out of order > not supported without ID on this input stream (fseek required) > > The dump works fine if I omit the -j option. What am I doing wrong? Perhaps this is fixed in 8.3.10. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com
Justin Falk <jfalkmu@gmail.com> writes: > When I try to restore I'm using: > pg_restore -d mydb -U postgres -j 4 mydb.backup > This results in an error: > pg_restore: [custom archiver] dumping a specific TOC data block out of order > not supported without ID on this input stream (fseek required) There was something similar reported here: http://archives.postgresql.org/pgsql-admin/2010-04/msg00237.php but we haven't got to the bottom of it yet. Can you create a self-contained test case? regards, tom lane
On Wed, Apr 14, 2010 at 2:38 AM, Justin Falk <jfalkmu@gmail.com> wrote:
Hi,
I'm trying to use the -j option on pg_restore while restoring a database into PG 8.4.3.
The dump was executed on PG 8.3.7 (Windows, Server 2003) using:pg_dump -Fc -U postgres mydb > mydb.backup
This results in a ~3.4 GB dump file.
When I try to restore I'm using:pg_restore -d mydb -U postgres -j 4 mydb.backup
This results in an error:pg_restore: [custom archiver] dumping a specific TOC data block out of order not supported without ID on this input stream (fseek required)
The dump works fine if I omit the -j option. What am I doing wrong?
I'm pretty sure that you need to use the 8.4 version of pg_dump when you create the backup file, then it should work.
--Scott
Thanks,
Justin
Justin Falk <jfalkmu@gmail.com> wrote: > I'm trying to use the -j option on pg_restore while restoring a > database into PG 8.4.3. > > The dump was executed on PG 8.3.7 (Windows, Server 2003) using: Using the 8.4.3 version of pg_dump, as recommended in the documentation?: http://www.postgresql.org/docs/8.4/interactive/migration.html "It is recommended that you use the pg_dump and pg_dumpall programs from the newer version of PostgreSQL, to take advantage of any enhancements that might have been made in these programs." -Kevin
On Wed, Apr 14, 2010 at 12:38 AM, Justin Falk <jfalkmu@gmail.com> wrote: > Hi, > > I'm trying to use the -j option on pg_restore while restoring a database > into PG 8.4.3. > > The dump was executed on PG 8.3.7 (Windows, Server 2003) using: I think you have to dump with 8.4 to use -j on restore.
Scott Mead <scott.lists@enterprisedb.com> writes: > On Wed, Apr 14, 2010 at 2:38 AM, Justin Falk <jfalkmu@gmail.com> wrote: >> This results in an error: >> pg_restore: [custom archiver] dumping a specific TOC data block out of >> order not supported without ID on this input stream (fseek required) > I'm pretty sure that you need to use the 8.4 version of pg_dump when you > create the backup file, then it should work. While that might be best practice, it's not clear why testing fails to reproduce the problem, as we found in the other recent thread. In any case it'd be nice to deliver a more helpful error message, if the combination really doesn't work in some cases. But we need a reproducible case to figure out why it's failing. regards, tom lane
On Tue, Apr 20, 2010 at 11:32 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > There was something similar reported here: > http://archives.postgresql.org/pgsql-admin/2010-04/msg00237.php > but we haven't got to the bottom of it yet. That issue turned out to be me not paying attention to the pg_dump output. There was a deadlock with another process trying to recreate a table. This caused the dump file to be incomplete. -- Bryan White