Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eGozI-0004EE-Bg for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Nov 2017 16:32:00 +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 1eGozH-0007b2-QC for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Nov 2017 16:31:59 +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.84_2) (envelope-from ) id 1eGozH-0007as-ER for pgsql-hackers@lists.postgresql.org; Mon, 20 Nov 2017 16:31:59 +0000 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eGozA-0006lx-EE for pgsql-hackers@postgresql.org; Mon, 20 Nov 2017 16:31:58 +0000 Received: by mail-wm0-x22b.google.com with SMTP id 128so11454063wmo.3 for ; Mon, 20 Nov 2017 08:31:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=5jiRZE6BJ8+QiRk0rdVX9KRY8auFmt5WnDWSfBXW190=; b=e4JKx1hnU1EuLXbsBVa8Q71S/fUcAO0ObnW+BVVhR3jVLiXKR6yuUXKk0xN/0Go2mh 1uXr3Y64+DM729bYMUpi7FDHqUO4glwzFvU8Yp22SX1/ix/8I9ZfxgUKSkd/YNkz6gGX TVDTF53RHJlaW1WKS4EhSegV/+tbJ9nSSItmF7ddShuyn4RrIpZxXutiu+yY58HGvSSk Phrd+xYFPA8giisYXqWaP2jEK7zr6jBehGD9+x5AaoP7PvhJM1DTG6tsFw9rxVjAWW4W /OFFSPq9r+szZe0Oa+9A2gYurpxJpNz8zn/UmtTomFNlxvM5j84KiDLZA/G9DX7I8Mv0 /MDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=5jiRZE6BJ8+QiRk0rdVX9KRY8auFmt5WnDWSfBXW190=; b=mA1wRspGxIPdOEH6n9rVTnICUriSQFN/3MtZjF7qdL5Ai7rMDFP2W1OTD9fnl+z68+ vsGw75ipN/8jHuQoY1KVZVmONmjg+dGGvl+DR2SlldoWjJoOkQMlRBnoB3pJoFIxhYjO k+urdu4g3Pj+4XnwNvg3NyJddFUv8JxQw38pi8uXcfPg/r6tXO5ZWzTcWXeS7RrHoG42 qGw3bu0uDkA3DKcNtfKSzGY6AN3pGHbRIS/+Ar3ojLkjs+7e5Zhcfn5cgI1q9GxHMOxX PypToC8aQtixt1RD0igFekQaq9fB8sRkCe0Vvc2H5TtsUBDSmf9qMqrzrp+EkP3L5JEE EyxQ== X-Gm-Message-State: AJaThX5uW58M84IU0iOj6SvhEpZMv3j36AbGwy7g145hoTfontDMPrIl b74SdJPkSkF9AX+NcA+HjtkPyUJoQSq6U0LFDhbMFigzVunWa2+6YzYkF1m+aQdxLesTqB5MuGM PL7JOQBQheo+osvZmCIBtyNrGTqvbvKYAUBrA4IyJkPmOdJeYh/qMfgoeWwJaUHZEQ4jeDckxYY XFET1CQk5G X-Google-Smtp-Source: AGs4zMY1UZ0qI5Lqg8wyleaadd1s8u/FrSBzWe3DzQdm5v2DNZSTv45vIJX/N7D8ISSJGoEZyaP8SA== X-Received: by 10.80.159.239 with SMTP id c102mr17626921edf.46.1511195509126; Mon, 20 Nov 2017 08:31:49 -0800 (PST) Received: from [10.137.2.19] (ip-78-102-97-226.net.upcbroadband.cz. [78.102.97.226]) by smtp.gmail.com with ESMTPSA id s8sm7987020edh.51.2017.11.20.08.31.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Nov 2017 08:31:48 -0800 (PST) Subject: Re: [HACKERS] Custom compression methods To: =?UTF-8?B?0JXQstCz0LXQvdC40Lkg0KjQuNGI0LrQuNC9?= Cc: Ildus Kurbangaliev , Andres Freund , Robert Haas , Oleg Bartunov , Craig Ringer , Peter Eisentraut , PostgreSQL Hackers References: <20170907194236.4cefce96@wp.localdomain> <20170912175505.4afa11fd@wp.localdomain> <5c84382f-1065-e9e8-dde8-4c1f5ae1007b@2ndquadrant.com> <20171102124101.5a28ecab@wp.localdomain> <20171115120928.31bee414@wp.localdomain> <20171120124428.6154f23f@wp.localdomain> <58471b21-2f8c-9fa9-63ca-4c37883b8307@2ndquadrant.com> <321450D5-FFDE-46A6-B10B-26B5E0D3BF49@gmail.com> <2488A5D0-9C39-48D1-A059-28CB99332B48@gmail.com> From: Tomas Vondra Message-ID: <641e18b7-1bb6-ba8d-fddb-d0259f970897@2ndquadrant.com> Date: Mon, 20 Nov 2017 17:31:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <2488A5D0-9C39-48D1-A059-28CB99332B48@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11/20/2017 04:43 PM, Евгений Шишкин wrote: > > >> On Nov 20, 2017, at 18:29, Tomas Vondra wrote: >> >>> >>> What about instead of dropping column we leave data uncompressed? >>> >> >> That requires you to go through the data and rewrite the whole table. >> And I'm not aware of a DROP command doing that, instead they just drop >> the dependent objects (e.g. DROP TYPE, ...). So per PLOS the DROP >> COMPRESSION METHOD command should do that too. > > Well, there is no much you can do with DROP TYPE. But i'd argue that compression > is different. We do not drop data in case of DROP STATISTICS or DROP INDEX. > But those DROP commands do not 'invalidate' data in the heap, so there's no reason to drop the columns. > At least there should be a way to easily alter compression method then. > +1 regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services