Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eGgqC-0006O3-JA for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Nov 2017 07:50:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eGgqC-0007Om-5G for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Nov 2017 07:50:04 +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 1eGgqC-0007Oc-0D for pgsql-hackers@lists.postgresql.org; Mon, 20 Nov 2017 07:50:04 +0000 Received: from mx1.mailbox.org ([80.241.60.212]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eGgq8-0000wc-Fj for pgsql-hackers@postgresql.org; Mon, 20 Nov 2017 07:50:03 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id A077847C07; Mon, 20 Nov 2017 08:49:58 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id 68iq40lEDumc; Mon, 20 Nov 2017 08:49:56 +0100 (CET) From: Antonin Houska To: Oleg Ivanov cc: pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Proposal: generic WAL compression In-reply-to: <23990.1510853483@localhost> References: <59F90ABF.2060407@postgrespro.ru> <23990.1510853483@localhost> Comments: In-reply-to Antonin Houska message dated "Thu, 16 Nov 2017 18:31:23 +0100." MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 20 Nov 2017 08:49:48 +0100 Message-ID: <8015.1511164188@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Antonin Houska wrote: > Oleg Ivanov wrote: >=20 > > In order to overcome that issue, I would like to propose the patch, whi= ch > > provides possibility to use another approach of the WAL record > > construction. >=20 > After having spent several hours reviewing this patch I dare to send the > following comments: One more idea: I think the metadata (ALIGN_GAP) should be stored separate from the actual data so that you can use memcpy() instead of this loop: while (i < j) { char c =3D targetRegionAligned[i++]; writeToPtr(ptr, c); } --=20 Antonin Houska Cybertec Sch=C3=B6nig & Sch=C3=B6nig GmbH Gr=C3=B6hrm=C3=BChlgasse 26 A-2700 Wiener Neustadt Web: http://www.postgresql-support.de, http://www.cybertec.at