Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f1yd3-0006gH-SE for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Mar 2018 18:19:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f1yd2-0000Oh-FR for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Mar 2018 18:19:56 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f1yd2-0000OJ-4X for pgsql-hackers@lists.postgresql.org; Fri, 30 Mar 2018 18:19:56 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f1ycz-00032p-9Z for pgsql-hackers@postgresql.org; Fri, 30 Mar 2018 18:19:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w2UIIkxD012916; Fri, 30 Mar 2018 14:18:46 -0400 From: Tom Lane To: Chapman Flack cc: Tomas Vondra , Michael Paquier , Stephen Frost , Daniel Gustafsson , Michael Paquier , Heikki Linnakangas , Robert Haas , Bruce Momjian , PostgreSQL Hackers Subject: Re: [HACKERS] AdvanceXLInsertBuffer vs. WAL segment compressibility In-reply-to: <5ABD9083.5050908@anastigmatix.net> References: <5A92F0C0.7070706@anastigmatix.net> <5AADB130.2020206@anastigmatix.net> <4597.1521338981@sss.pgh.pa.us> <46FFB930-B0F3-400A-85ED-D9948C97FADF@yesql.se> <5AAEE00E.9050503@anastigmatix.net> <21C25ED8-4ED8-4AD4-B551-3E3987ECB18F@yesql.se> <5AAEFF11.3070903@anastigmatix.net> <20180326032731.GM24540@tamriel.snowman.net> <20180326054354.GB2759@paquier.xyz> <5ABAC668.5080203@anastigmatix.net> <8c00b26a-d6da-5764-e67e-9c4d8128081a@2ndquadrant.com> <5ABD9083.5050908@anastigmatix.net> Comments: In-reply-to Chapman Flack message dated "Thu, 29 Mar 2018 21:18:59 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12914.1522433926.1@sss.pgh.pa.us> Date: Fri, 30 Mar 2018 14:18:46 -0400 Message-ID: <12915.1522433926@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Chapman Flack writes: > On 03/27/18 22:10, Michael Paquier wrote: >> Here you go for one example: >> https://sourceforge.net/projects/pglesslog/ > In any case, from my study of the commit, it is hard for me to see an issue. > The code comment says: "mark the header to indicate that WAL records > beginning in this page have removable backup blocks." Yeah, that commit just moved a flag from individual WAL records to page headers, arguing that it was okay to assume that the same flag value applies to all records on a page. If there are no records in the page, it doesn't matter what you think the flag value is. A potentially stronger complaint is that WAL-reading tools might fail outright on a page with an invalid header, but I'd say that's a robustness issue that they'd need to address anyway. There's never been any guarantee that the trailing pages of a WAL segment are valid. regards, tom lane