Re: pg_dump error... Follow up

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Adam Witney <awitney(at)sgul(dot)ac(dot)uk>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>, Michael Fuhr <mike(at)fuhr(dot)org>
Subject: Re: pg_dump error... Follow up
Date: 2005-09-08 13:38:17
Message-ID: 20050908133817.GD12971@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Sep 08, 2005 at 10:32:41AM +0100, Adam Witney wrote:

> Unfortunately the pg_filedump you requested gives an error:
>
> pg_filedump -R 165390 165392 134401986
>
> *******************************************************************
> * PostgreSQL File/Block Formatted Dump Utility - Version 3.0
> *
> * File: 134401986.1
> * Options used: -R 165390 165392
> *
> * Dump created on: Thu Sep 8 10:33:47 2005
> *******************************************************************
> Error: Premature end of file encountered.
>
> (there is a .1 file also for this table, do I have to stick the two together
> or something?)

No, rather tell pg_filedump to use the second segment (.1 file) and
substract the total number of blocks in the first segment. If my math
is right there are 131072 blocks of 8kB per 1GB segment, so to dump
block 165390 you need to ask for block 34318 in the second segment:

pg_filedump -R 34318 34320 134401986.1

--
Alvaro Herrera -- Valdivia, Chile Architect, www.EnterpriseDB.com
"Et put se mouve" (Galileo Galilei)

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Adam Witney 2005-09-08 13:50:29 Re: pg_dump error... Follow up
Previous Message Alvaro Herrera 2005-09-08 13:25:44 Re: Please help - libpq API