Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VLexZ-0001kq-OV for pgsql-bugs@arkaria.postgresql.org; Mon, 16 Sep 2013 19:59:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VLexZ-0002OD-8O for pgsql-bugs@arkaria.postgresql.org; Mon, 16 Sep 2013 19:59:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VLexY-0002O6-9V for pgsql-bugs@postgresql.org; Mon, 16 Sep 2013 19:59:48 +0000 Received: from erlenstar.riddles.org.uk ([82.68.208.17]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VLexR-0000UZ-0R for pgsql-bugs@postgresql.org; Mon, 16 Sep 2013 19:59:48 +0000 Received: from andrew by erlenstar.riddles.org.uk with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1VLex9-00095T-1t; Mon, 16 Sep 2013 19:59:23 +0000 To: Heikki Linnakangas Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8453: uninitialized memory access in pg_receivexlog and other bugs From: Andrew Gierth In-Reply-To: <52375F67.3040503@vmware.com> (Heikki Linnakangas's message of "Mon, 16 Sep 2013 22:43:35 +0300") Message-ID: <87txhk5yya.fsf@news-spur.riddles.org.uk> References: <52375F67.3040503@vmware.com> Date: Mon, 16 Sep 2013 20:59:23 +0100 User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org >>>>> "Heikki" == Heikki Linnakangas writes: >> Also, receivexlog is ignoring .partial and .history files when >> determining which timeline to start streaming from, which means >> that if there are two timeline changes that are not separated by a >> WAL segment switch, it will fail to operate due to attempting to >> start from a too-old timeline (for which xlogs are not available >> on the server). Heikki> There's nothing we can do with .history files here. The point Heikki> is to find out how far we have already received WAL, and the Heikki> presence of a .history file doesn't tell you anything about Heikki> that. I was thinking that the presence of a history file might at least be useful for setting a bound on what TLI we're going to use; but if a possible .partial file is taken into account the issue should be moot anyway I guess. Heikki> Attached is a patch to fix both of these issues. I'm too Heikki> tired right now to thoroughly test it and commit, so I'll get Heikki> back to this tomorrow. Meanwhile, please take a look and let Heikki> me know if you can see something wrong. A quick eyeball check looks ok; I'll see about reproducing the original scenario with this patch applied. -- Andrew (irc:RhodiumToad) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs