Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edig3-00062m-K5 for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jan 2018 20:26:48 +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 1edig2-0002Gn-Fb for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jan 2018 20:26:46 +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 1edig2-0002Gc-30 for pgsql-hackers@lists.postgresql.org; Mon, 22 Jan 2018 20:26:46 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1edifr-0003tR-14 for pgsql-hackers@postgresql.org; Mon, 22 Jan 2018 20:26:43 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 52B8121C074F; Mon, 22 Jan 2018 23:26:33 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from zilders-MacBook-Pro.local (unknown [94.29.3.222]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 63CBA21C042B; Mon, 22 Jan 2018 23:26:32 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1516652793; bh=hICWaUmHb3TS7/nc4X8dQm1UaifhKFMr6vaOcQvCgy0=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=BahPJVBFEP6WLIRYoTVLTu7zto2f/dgfGCMYMirkq0ilMyCNUItjsZcWTPPe4xlgH 98lOBIz7A8SQM+596/V7pXVc40XvcoErWm7XXurD7v6BrP8GJoD0c/OXJvo8qUsAjA aF1thNJc18baSpRfAGMd/lrTSsyPeKslewK5UbFY= Subject: Re: [HACKERS] Custom compression methods To: Ildus Kurbangaliev , Robert Haas Cc: Alexander Korotkov , Tomas Vondra , Alvaro Herrera , =?UTF-8?B?0JXQstCz0LXQvdC40Lkg0KjQuNGI0LrQuNC9?= , Andres Freund , Oleg Bartunov , Craig Ringer , Peter Eisentraut , PostgreSQL Hackers , Chapman Flack References: <20171201194859.le5hvnnrjzhxhm2t@alvherre.pgsql> <20171206180716.75ba9ba9@postgrespro.ru> <20171211155555.05ddd2fc@postgrespro.ru> <20171213151818.75a20259@postgrespro.ru> <20171218115431.2b3e29ba@wp.localdomain> <20180115024930.48583c69@hh> From: Ildar Musin Message-ID: <0633c6e5-5328-5c5b-708b-c4409e3fd131@postgrespro.ru> Date: Mon, 22 Jan 2018 23:26:31 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180115024930.48583c69@hh> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Language: ru List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello Ildus, 15/01/2018 00:49, Ildus Kurbangaliev пишет: > Attached a new version of the patch. Main changes: > > * compression as an access method > * pglz as default compression access method. > * PRESERVE syntax for tables rewrite control. > * pg_upgrade fixes > * support partitioned tables. > * more tests. > You need to rebase to the latest master, there are some conflicts. I've applied it to the three days old master to try it. As I can see the documentation is not yet complete. For example, there is no section for ALTER COLUMN ... SET COMPRESSION in ddl.sgml; and section "Compression Access Method Functions" in compression-am.sgml hasn't been finished. I've implemented an extension [1] to understand the way developer would go to work with new infrastructure. And for me it seems clear. (Except that it took me some effort to wrap my mind around varlena macros but it is probably a different topic). I noticed that you haven't cover 'cmdrop' in the regression tests and I saw the previous discussion about it. Have you considered using event triggers to handle the drop of column compression instead of 'cmdrop' function? This way you would kill two birds with one stone: it still provides sufficient infrastructure to catch those events (and it something postgres already has for different kinds of ddl commands) and it would be easier to test. Thanks! [1] https://github.com/zilder/pg_lz4 -- Ildar Musin Postgres Professional: http://www.postgrespro.com Russian Postgres Company