Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dOFvb-0001oA-Jz for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Jun 2017 04:10:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dOFvb-0008BG-23 for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Jun 2017 04:10:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dOFu3-0005Fe-OE for pgsql-hackers@postgresql.org; Fri, 23 Jun 2017 04:09:03 +0000 Received: from bay.acenet.us ([173.230.252.50]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dOFu0-0005s7-JY for pgsql-hackers@postgresql.org; Fri, 23 Jun 2017 04:09:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=anastigmatix.net; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3LugwUHzwUcNr62Ra5IBbpixm9A3GjhhsgFohoV2+90=; b=FkQCJ0fK0KELfgAXclYWmOhq+1 61YNuuJX7O1Amg6VKd9zzF0yYO/U4dLDUwamIAkhFe8ELGQoLmH0yD++W9LYMFBEdVlV1Ii+WVua8 ZOhOKa21ySyDjl5QYSiu3cff4Bqi/x6RaByKYlmX1Pbumrskns7E1lAzjlyyYFTQlwL9glMhYfgv5 L9KHlAUQQfOexJjiX5xW+7Ct3ICc4HHibw9ISrS47OAWFxkeDUYia4Bt6NxfY+wpFnbm2XwOQldtl Oe1I5QhDcfTGKBVex2xGhIl10aJ3LmEqeO1muHBv4IKg8cNwi2iHiN3Z7TufgoklXhTSrj3TT0S3x Ej+B1ARQ==; Received: from [50.102.16.86] (port=37312) by bay.acenet.us with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) (envelope-from ) id 1dOFtv-002Ete-Lp; Fri, 23 Jun 2017 00:08:56 -0400 Subject: Re: AdvanceXLInsertBuffer vs. WAL segment compressibility To: Heikki Linnakangas , Robert Haas , Bruce Momjian References: <579297F8.7020107@anastigmatix.net> <5797D953.6040806@anastigmatix.net> <20160802183347.GD32575@momjian.us> <20943eba-bbb9-390c-01b1-e6704ce33c7b@iki.fi> Cc: PostgreSQL Hackers From: Chapman Flack X-Enigmail-Draft-Status: N1110 Message-ID: <594C9457.6000708@anastigmatix.net> Date: Fri, 23 Jun 2017 00:08:55 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <20943eba-bbb9-390c-01b1-e6704ce33c7b@iki.fi> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-95.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bay.acenet.us X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - anastigmatix.net X-Get-Message-Sender-Via: bay.acenet.us: authenticated_id: chap+anastigmatix.net/only user confirmed/virtual account not confirmed X-Authenticated-Sender: bay.acenet.us: chap@anastigmatix.net X-Source: X-Source-Args: X-Source-Dir: List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 06/21/17 04:51, Heikki Linnakangas wrote: > (I'm cleaning up my inbox, hence the delayed reply) I had almost completely forgotten ever bringing it up. :) > When I wrote that code, I don't remember if I realized that we're > initializing the page headers, or if I thought that it's good enough even if > we do. I guess I didn't realize it, because a comment would've been in order > if it was intentional. > > So +1 on fixing that, a patch would be welcome. Ok, that sounds like something I could take a whack at. Overall, xlog.c is a bit daunting, but this particular detail seems fairly approachable. > In the meanwhile, have you > tried using a different compression program? Something else than gzip might > do a better job at the almost zero pages. Well, gzip was doing pretty well; it could get a 16 MB segment file down to under 27 kB, or less than 14 bytes for each of 2000 pages, when a page header is what, 20 bytes, it looks like? I'm not sure how much better I'd expect a (non-custom) compression scheme to do. The real difference comes between compressing (even well) a large unchanged area, versus being able to recognize (again with a non-custom tool) that the whole area is unchanged. -Chap -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers