pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alejandro Carrillo <fasterzip@yahoo.es>
To: Jeff Davis <pgsql@j-davis.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Recover rows deleted
Date: Mon, 4 Jun 2012 17:14:11 +0100 (BST)
Message-ID: <1338826451.78107.YahooMailNeo@web171001.mail.ukl.yahoo.com> (raw)
In-Reply-To: <1338324800.28651.5.camel@sussancws0025>
References: <1338229453.91030.YahooMailNeo@web171005.mail.ukl.yahoo.com>
	<1338324800.28651.5.camel@sussancws0025>

Anybody knows a function that let's recover a record (row) deleted in Windows?

Thanks




>________________________________
> De: Jeff Davis <pgsql@j-davis.com>
>Para: Alejandro Carrillo <fasterzip@yahoo.es> 
>CC: "pgsql-performance@postgresql.org" <pgsql-performance@postgresql.org> 
>Enviado: Martes 29 de Mayo de 2012 15:53
>Asunto: Re: [PERFORM] Recover rows deleted
> 
>On Mon, 2012-05-28 at 19:24 +0100, Alejandro Carrillo wrote:
>> Hi,
>> 
>> 
>> ¿How I can recover a row delete of a table that wasn't vacuummed?
>> I have PostgreSQL 9.1 in Windows XP/7.
>
>The first thing to do is shut down postgresql and take a full backup of
>the data directory, including any archived WAL you might have (files in
>pg_xlog). Make sure this is done first.
>
>Next, do you have any backups? If you have a base backup from before the
>delete, and all the WAL files from the time of the base backup until
>now, then you can try point-in-time recovery to the point right before
>the data loss:
>
>http://www.postgresql.org/docs/9.1/static/continuous-archiving.html
>
>If not, are we talking about a single row, or many rows? If it's a
>single row you might be able to do some manual steps, like examining the
>pages to recover the data.
>
>Another option is to try pg_resetxlog (make sure you have a safe backup
>first!):
>
>http://www.postgresql.org/docs/9.1/static/app-pgresetxlog.html
>
>And try setting the current transaction ID to just before the delete
>ran. Then you may be able to use pg_dump or otherwise export the deleted
>rows.
>
>Regards,
>    Jeff Davis
>
>
>-- 
>Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
>To make changes to your subscription:
>http://www.postgresql.org/mailpref/pgsql-performance
>
>
>

view thread (13+ messages)  latest in thread

Message-ID: <1338826451.78107.YahooMailNeo@web171001.mail.ukl.yahoo.com>
Permalink:  ../1338826451.78107.YahooMailNeo@web171001.mail.ukl.yahoo.com/
Also on:    postgresql.org/message-id/1338826451.78107.YahooMailNeo@web171001.mail.ukl.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: fasterzip@yahoo.es, pgsql@j-davis.com
  Subject: Re: Recover rows deleted
  In-Reply-To: <1338826451.78107.YahooMailNeo@web171001.mail.ukl.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox