RE: BUG #17156: pg_restore: [custom archiver] WARNING: ftell mismatch with expected position -- ftell used

From: Ashutosh Kumar <Ashutosh(dot)Kumar(at)morningstar(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, "sawada(dot)mshk(at)gmail(dot)com" <sawada(dot)mshk(at)gmail(dot)com>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: RE: BUG #17156: pg_restore: [custom archiver] WARNING: ftell mismatch with expected position -- ftell used
Date: 2021-08-24 10:01:52
Message-ID: BN0PR10MB550357B0C4483BF15F6A63B59EC59@BN0PR10MB5503.namprd10.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Restore Command :

On Prem backup(linux RHEL) to RDS PostgreSQL

Backup size around : 6.4 GB(on prem server which was restored on RDS postgres when I received the warning)

Thanks,
Ashu

-----Original Message-----
From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Sent: Tuesday, August 24, 2021 2:12 PM
To: sawada(dot)mshk(at)gmail(dot)com
Cc: Ashutosh Kumar <Ashutosh(dot)Kumar(at)morningstar(dot)com>; pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17156: pg_restore: [custom archiver] WARNING: ftell mismatch with expected position -- ftell used

[EXTERNAL EMAIL]

At Tue, 24 Aug 2021 14:25:50 +0900, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com<mailto:sawada(dot)mshk(at)gmail(dot)com>> wrote in
> On Mon, Aug 23, 2021 at 7:31 PM PG Bug reporting form
> <noreply(at)postgresql(dot)org<mailto:noreply(at)postgresql(dot)org>> wrote:
> >
> > The following bug has been logged on the website:
> >
> > Bug reference: 17156
> > Logged by: Ashutosh Kumar
> > Email address: ashutosh(dot)kumar(at)morningstar(dot)com<mailto:ashutosh(dot)kumar(at)morningstar(dot)com>
> > PostgreSQL version: 10.18
> > Operating system: RHEL
> > Description:
> >
> > Getting below warning when I am restoring the backup file :
> >
> > Warning Message : pg_restore: [custom archiver] WARNING: ftell
> > mismatch with expected position -- ftell used
> >
> > Backup was taken with below command :
> >
> > pg_dump -h'127.0.0.1' -p 5432 -U (username) -Fc databasename >
> > backupfile.sql
> >
> > I am restoring it with pg_restore when i got the above warning.
>
> Could you share the exact pg_restore command with the arguments you executed?
>
> What's is the size of the backup? Are both Postgres servers that you
> took/restored the backup from/to are RHEL?
>
> Could you try to execute pg_dump without a pipe and restore it and see
> the same error happens? That is, please execute "pg_dump -h'127.0.0.1'
> -p 5432 -U (username) -Fc databasename -f backupfile.sql".

That error means when reading a seekable source, the file pointer ftello returns doesn't consistent with how many bytes pg_restore has read, or ftello returned an error. Considering that the path is very ancient, the latter likely to happen. If the failure is reproducible, running pg_restore with strace could show something helpful.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Rainer Tammer 2021-08-24 11:55:11 Re: Postgres 9.2.13 on AIX 7.1
Previous Message David Rowley 2021-08-24 09:55:18 Re: BUG #17158: Distinct ROW fails with Postgres 14