Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 4237A9FB62C for ; Tue, 19 Jun 2007 09:12:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 17011-06 for ; Tue, 19 Jun 2007 09:12:17 -0300 (ADT) X-Greylist: delayed 00:32:57.084961 by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 0C01F9FB743 for ; Tue, 19 Jun 2007 09:12:16 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from flobit.com (crm.intera.si [212.72.99.37]) by svr4.postgresql.org (Postfix) with ESMTP id B4C6D5AF883 for ; Tue, 19 Jun 2007 11:39:18 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by flobit.com (Postfix) with ESMTP id CC187E88704; Tue, 19 Jun 2007 13:39:05 +0200 (CEST) Received: from flobit.com ([127.0.0.1]) by localhost (gorenc.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 19721-03; Tue, 19 Jun 2007 13:39:04 +0200 (CEST) Received: from [192.168.0.60] (89-212-7-217.static.dsl.t-2.net [89.212.7.217]) by flobit.com (Postfix) with ESMTP id B2CB3E88610; Tue, 19 Jun 2007 13:39:04 +0200 (CEST) Message-ID: <4677C02B.8090607@intera.si> Date: Tue, 19 Jun 2007 13:38:19 +0200 From: Aleksander Kmetec - INTERA User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: Jim Nasby Cc: zz_11@mail.bg, pgsql-admin@postgresql.org Subject: Re: How to restore updated records References: <1181583306.d9d10231a3c6c@mail.bg> <1181665149.b014150a4b253@mail.bg> <963E8496-D890-419B-B71A-773B4DBA1BDB@decibel.org> In-Reply-To: <963E8496-D890-419B-B71A-773B4DBA1BDB@decibel.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at intera.si X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.857 tagged_above=0 required=5 tests=BAYES_50=0.001, FORGED_RCVD_HELO=0.135, RCVD_IN_NJABL_PROXY=0.721 X-Spam-Level: X-Archive-Number: 200706/162 X-Sequence-Number: 25830 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. Regards, Aleksander 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@mail.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. >>