Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eGo0e-0006by-8E for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Nov 2017 15:29:20 +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 1eGo0d-000191-RX for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Nov 2017 15:29:19 +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 1eGo0d-00018l-M3 for pgsql-hackers@lists.postgresql.org; Mon, 20 Nov 2017 15:29:19 +0000 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eGo0a-0002BB-6v for pgsql-hackers@postgresql.org; Mon, 20 Nov 2017 15:29:19 +0000 Received: by mail-wm0-x22d.google.com with SMTP id y80so19506929wmd.0 for ; Mon, 20 Nov 2017 07:29:15 -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=xCZx7H8t/F7l7Ot5XDqC6IHIuCf7QbFrYtqx+o27zI8=; b=lr+k2uvVNSAo+BMApkDayXCnI5PTNIo+hb2MnuYMyB+w8jnJHSlC0xPxQexnEksZjh mGB+fGjiuh81lcWFDG+4dhdv+t4UxvfDcbhkNEj6odVctJcEC6Y738h5fsfI/Qlok/Sj ikBdIEAAo72qTwHWgNoKaEOk0zTrb0qZ3ZK8w6osIuYq15U0aCyCH35ZMCyX4/PupgSu IYwmeiHG3it/xCd36Skhzr4VvgBJcMjX1Is2zwm1BSgJ40+m9K5uIPlY3mibC4DVLom4 e6dJPbe50DMBMjboR8rr9Mx1Xj+pjiJxREPnBHAjLlHJi8ACcQ1O7KCBRE2jLzi1wchf 7Egg== 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=xCZx7H8t/F7l7Ot5XDqC6IHIuCf7QbFrYtqx+o27zI8=; b=X1X71Ik5aCOnRyKtbLJ2/z8wYtWtLmU4lL3Z0lsxJ1eOcNLHWAaHz8dyQq91c/BLqK bqTn+4X8xtj8OtdKSdWDqSpFIIGtL6NY6/YptGvcceSBXDXd11CDQ//8LfQB6NIIwzcB xpPuJ5nFNSoHp2DhiTIIgJnQWyo88F8CQ/ikC9Aad2U8t1MXZ0zwpUBm1tJosgnX+Qlu RF4p/tNxd929R+dAk8nUigqjce96dypVh395Knxsd4c0Oy9E0UgtxMeSVhmXK5glbEKT anzlTCxOYX2YAH/Y9qAVYLyV1nqAUpGOckeNNHXppTEvZLRuJVJrWKJp5zZo17tW8ewu poKQ== X-Gm-Message-State: AJaThX41U5gcDLPalHmlu+HYwyUANPfcmBj9hUdeqi3wqi3r9lTPcouA 8gMnt5zG1PM3E1/F7Ej90wWlL9Gaq+AHz/5ep30H1MCW4x7KfF9heZlclG9G0Caw9T4d5QPj+s9 L7OIAM7nb6wDTsmR7OA21BFEhhtzIFh2ybQvj65veBsA7kRMLMbAPofQCqQD6rycQODab2bmXlm J8QmeGgmM3 X-Google-Smtp-Source: AGs4zMbpeM4UmpMP6vg3RD5Ya6WdNlyUCFm8Xl+VGzSKI2yfrKbmxyiX8XAGd0lNvPen+5xl6obcEg== X-Received: by 10.28.247.15 with SMTP id v15mr10152686wmh.152.1511191754602; Mon, 20 Nov 2017 07:29:14 -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 p81sm8802737wrc.61.2017.11.20.07.29.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Nov 2017 07:29:14 -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> From: Tomas Vondra Message-ID: Date: Mon, 20 Nov 2017 16:29:11 +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: <321450D5-FFDE-46A6-B10B-26B5E0D3BF49@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11/20/2017 04:21 PM, Евгений Шишкин wrote: > > >> On Nov 20, 2017, at 18:18, Tomas Vondra > > wrote: >> >> >> I don't think we need to do anything smart here - it should behave just >> like dropping a data type, for example. That is, error out if there are >> columns using the compression method (without CASCADE), and drop all the >> columns (with CASCADE). > > 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. But I'm wondering if ALTER COLUMN ... SET NOT COMPRESSED should do that (currently it only disables compression for new data). regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services