Skip site navigation (1) Skip section navigation (2)

Re: How to restore updated records

From: Aleksander Kmetec - INTERA <aleksander(dot)kmetec(at)intera(dot)si>
To: Jim Nasby <decibel(at)decibel(dot)org>
Cc: zz_11(at)mail(dot)bg, pgsql-admin(at)postgresql(dot)org
Subject: Re: How to restore updated records
Date: 2007-06-19 11:38:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
About 2 years ago a new guy at our company deleted all contents of a table on a development server and I managed to 
restore them by changing the XID value with pg_resetxlog.

You can get last chackpoint's XID by running pg_controldata; then use pg_resetxlog -x and try different values. You'll 
need to repeat the "copy from backup - change XID - start postmaster" cycle a few times; but it should be doable in less 
than an hour.


Jim Nasby wrote:
> Your best bet on something like this is probably going to be contacting 
> a company that does PostgreSQL support and inquiring about data 
> recovery. EnterpriseDB and Command Prompt both employ folks who could 
> probably accomplish this; I think OmniTI might as well. There's probably 
> a few others.
> On Jun 12, 2007, at 11:19 AM, zz_11(at)mail(dot)bg wrote:
>> No, I do not have WAL archiving.
>> I hope some one have done the hacking in postmaster.
>> If no one have done this, my idea was to change the vacuum
>> (or make e new copy).
>> I am not familiar with pg code, but as I know by running
>> vacuum, pg marks deleted records as free, and my idea was to
>> mark this records as real record in the database (if it is
>> possible).
>> regards,
>> ivan.

In response to

pgsql-admin by date

Next:From: George WilkDate: 2007-06-19 12:17:32
Subject: archive_command does not execute
Previous:From: Andrew KellyDate: 2007-06-19 08:23:27
Subject: Re: [GENERAL] [PERFORM] Postgres VS Oracle

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group