Re: pg_restore and large files - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_restore and large files
Date
Msg-id 2914.1075995238@sss.pgh.pa.us
Whole thread Raw
In response to pg_restore and large files  (Mike Charnoky <noky@nextbus.com>)
Responses Re: pg_restore and large files  (Mike Charnoky <noky@nextbus.com>)
Re: pg_restore and large files  (Mike Charnoky <noky@nextbus.com>)
List pgsql-general
Mike Charnoky <noky@nextbus.com> writes:
> I am currently using PostgreSQL v7.3.4 on a RedHat 8.0 system (2.4.23 kernel)
> using the ext3 filesystem.  I am experiencing problems when performing a
> pg_restore using a file which is 2.3G in size.  The dump, which seemed to run
> smoothly, was created using the -Fc option.  When I perform the restore, the
> following error occurs before the pg_restore fails:

> pg_restore: [custom archiver] error during file seek: Invalid argument
> pg_restore: *** aborted because of error

> Why is this happening?  The error comes from pg_backup_custom.c, it seems that
> an fseeko() is failing (even though this is the way to support large
> files).

Hm, can you insert some debugging printout to show the offset value
being passed to fseeko?  That would let us eliminate one of pg_restore
and the kernel as being at fault.  Another thing that'd be useful is to
run pg_restore under gdb with a breakpoint set at die_horribly, so that
you could get a stack trace from the point of the failure.

I am suspicious that it's a pg_restore bug and the problem has to do
with manipulating file offsets as plain integers someplace.  Not enough
info yet to go searching, though.

            regards, tom lane

pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: ERROR: column 'xxx' does not exist (under v. 7.4.1)
Next
From: "Oleg Lebedev"
Date:
Subject: Re: dblink: rollback transaction