X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 351A911F6B3E for ; Sat, 8 Apr 2006 09:39:41 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 1.713 X-Spam-Level: * X-Spam-Status: No, score=1.713 required=5 tests=[RCVD_IN_NJABL_DUL=1.713] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id N-TFQ4QSoYCQ for ; Sat, 8 Apr 2006 09:39:30 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from p0f.net (p0f.net [193.77.154.190]) by postgresql.org (Postfix) with ESMTP id EA01511F6AE2 for ; Sat, 8 Apr 2006 09:39:37 -0300 (ADT) Received: from [192.168.13.30] (BSN-61-28-181.dial-up.dsl.siol.net [86.61.28.181]) (authenticated bits=0) by p0f.net (8.13.3/8.13.3) with ESMTP id k38BxSkI018038 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 8 Apr 2006 13:59:29 +0200 Message-ID: <4437AF15.3020707@p0f.net> Date: Sat, 08 Apr 2006 14:39:49 +0200 From: Grega Bremec Organization: P0F User-Agent: Mozilla Thunderbird 1.0 (X11/20041207) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Rajesh Kumar Mallah CC: pgsql-admin@postgresql.org Subject: Re: FW: Setting up of PITR system. References: <442B93DD.4020305@p0f.net> <442E1945.4030006@p0f.net> <442FDC7F.9010001@p0f.net> <4430BC59.7040006@p0f.net> In-Reply-To: X-Enigmail-Version: 0.93.0.0 OpenPGP: id=E077F97A Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200604/80 X-Sequence-Number: 21249 -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 Rajesh Kumar Mallah wrote: |>| Do you see any problem in the current approach ? |>| i have seen it working fine till now. |> |>I do, to be honest. The WAL location counter accounts for 4294967295 |>positions and while I'm certain that's WAY more than the average number |>of transactions that go into a WAL, quite a number of small ones can |>certainly happen before a WAL is rolled over, and until then, you're |>dealing with the same log file. |> |>If two backups happen in that period of time for whatever reason, you're |>going to have a false positive by looking into ${WAL_ARCHIVE} and |>searching just for the WAL name, so including the location in the search |>of a WAL fragment is certainly necessary. Infact, going purely by |>chance, the probability of hitting the same location in two different |>log files in two subsequent backups is much lower than hitting the same |>WAL twice. | | The current wal log is not being removed from the wal archive area | in any case. The files less than the current ones are being rm'ed. | | I am sorry i am not able to get your apprehension. But i shall | surely try harder to understand your point. Hi Rajesh, list. I'm sorry I didn't get back to you earlier, I was at an IBM business conference for a couple of days; not to say it rendered me incapable of communicating via e-mail, but it did bring along certain social responsibilities which caused me to both stay up and sleep late, if you know what I mean. :) Let me explain the above predicament in more practical terms. Let us say you started a backup very soon after a WAL had been rolled over. Current WAL at that time was called, for example, ${PGDATA}/pg_xlog/000000010000000E0000000A. The location at that time was 000F594A (iow, early in the WAL cycle). [disclaimer: all events in this story are entirely fictional, any similarity to actual persons and events is purely coincidental :) ] pg_start_backup() will create a WAL backup: ~ ${PGDATA}/pg_xlog/000000010000000E0000000A.000F594A.backup which will be archived to ${WAL_ARCHIVE} under the same name, or possibly given a different extension, depending on archive_method. Let us assume for the purpose of this explanation, that archive_method consists only of cp -i