Re: Forensic recovery deleted pgdump custom format file

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: David Guimaraes <skysbsb(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Forensic recovery deleted pgdump custom format file
Date: 2015-07-14 01:18:49
Message-ID: CAB7nPqQq4FnXQ8xOAyMvoD_nYEC0f4DiNFEcAW5UbKoHgPcDKw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 14, 2015 at 9:28 AM, David Guimaraes <skysbsb(at)gmail(dot)com> wrote:
> So I decided to try to understand the file format generated by
> pgdump. Analyzing the source code of pgdump/recovery, i concluded a few
> things:
>
> The header of the file always starts with "PGDMP" followed by pgdump version
> number used, followed by int size, offset, etc. followed by TOCs.
>
> My question is how to know the end of the file? Are there any signature that
> I can use? Or would have to analyze the whole file?

Why are you trying to reinvent the wheel? pg_restore is not available?
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2015-07-14 01:28:44 Re: PostgreSQL 9.5 Alpha 1 build fail with perl 5.22
Previous Message David Guimaraes 2015-07-14 00:28:18 Forensic recovery deleted pgdump custom format file