Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pgs4d-0006AB-BV for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Mar 2023 19:00:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pgs4c-0002HU-30 for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Mar 2023 19:00:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pgs4b-0002HA-Ol for pgsql-bugs@lists.postgresql.org; Mon, 27 Mar 2023 19:00:05 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pgs4Z-00014G-OC for pgsql-bugs@lists.postgresql.org; Mon, 27 Mar 2023 19:00:04 +0000 Received: by mail-lf1-x135.google.com with SMTP id c9so2343363lfb.1 for ; Mon, 27 Mar 2023 12:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679943602; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=On4iTNSfvrdFoZPH5eHWHNvu5P1QHfvfbFknNtHhayY=; b=jDg084RV5d+jm2gowvWTWCvrdmxHdjSR9op8DUeisF3t02/c5xrsXbE4hZr29HzvAl OMZi/aTO3VmCxLS8o1hzNXoVn8qwANGMiCZ6m//STutQydEi8d/dvsM0ozuZFrU0lVmk twKrAPFRQW+3BuizEwd71XH0evbdOug857/3B1lDPn24+IiYjoB5WV/KFv6qjt0TUbao fXrciCSIlT/8NYoNsUZzgcU0rmo+24zdX1GFkAS5M5oTz+eD2BKttFZz+ob/5Jy3fDeF 3dHmJw8RflS+JHyWU2Dbn5JI53vZPK5W6o8P3r1C1xvMwdSPeu5RNTks84TC/pj0pkVE CAPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679943602; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=On4iTNSfvrdFoZPH5eHWHNvu5P1QHfvfbFknNtHhayY=; b=JMwKorni16DXQxEpT1m0AemXm1PXJWIP2poIo1qhHHlOprXnIftrmCAOodVLwRDEOa PTFqJPODaeV3BvskSf7j7EQkQQsKKeZjS5OHzuSfOaNlvPSLo9e2yXgWQWhDJfmmSkEY /Zp6PhO2z5lMx2kh/wlj3WkbTTs0B/fBt2pHq319mQfzE8jNATyCPGls0KF8CF2hOvvS ByAbbKtO/S4EJjs7QNxBFxPDtMd0R5jGFtr+lVw+0MkAqUNDgyfm53o18ncAW1E3YT6y oBsWlqUbVA/ld3t4dOO7Mmp15omPuYdu1UpD/EJqgLHr9FWgQTkZQ05q+T7Nw44YvEKs GA/Q== X-Gm-Message-State: AAQBX9dy9NxB2d5ER0FNdF75lOSkdTUK4yRd2fmJ//wM/KpBqVZVrwuj XMjWmvmKlJ2y7bZqpaZbInc= X-Google-Smtp-Source: AKy350b6ur9NJp46lk+MvW3eWAVVcCfMNkMJog2DZ3k/iaV5FOZAvkGdza46wnkUJ6kIyPaihQcC0Q== X-Received: by 2002:a19:7512:0:b0:4eb:c85:60eb with SMTP id y18-20020a197512000000b004eb0c8560ebmr1931638lfe.36.1679943602145; Mon, 27 Mar 2023 12:00:02 -0700 (PDT) Received: from [1.0.0.7] ([178.155.20.18]) by smtp.gmail.com with ESMTPSA id c9-20020ac25309000000b004eb1158ff0esm377063lfh.298.2023.03.27.12.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Mar 2023 12:00:01 -0700 (PDT) Message-ID: <67cb509e-93c7-1c7b-2388-d7e00277b344@gmail.com> Date: Mon, 27 Mar 2023 22:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: BUG #17872: Dropping an attribute of a composite type breaks indexes over the type silently Content-Language: en-US To: Tom Lane Cc: pgsql-bugs@lists.postgresql.org, Peter Eisentraut References: <17872-d0fbb799dc3fd85d@postgresql.org> <3169550.1679928579@sss.pgh.pa.us> <3182314.1679935605@sss.pgh.pa.us> <1aa2eec0-2017-3870-6d88-228d08c587d3@gmail.com> <3267914.1679941213@sss.pgh.pa.us> From: Alexander Lakhin In-Reply-To: <3267914.1679941213@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 27.03.2023 21:20, Tom Lane wrote: > Alexander Lakhin writes: >> Yes, I think something like that can resolve the issue. >> But I would also note that the problem is not with indexes only, but also >> with "... partition by list(comp_type_value)", for example. > Hmm ... really? I'd just concluded that a partitioned table is okay > as long as it doesn't yet have any partitions. Even if the modified > type is a partitioning column, there's no structure yet that could > depend on the contents of the type. (If it does have partitions, > we'll fail when we get to one of those.) The following query leads to a failure on showing a partition definition: CREATE TABLE tbl(a int, b int) PARTITION BY LIST ((tbl)); CREATE TABLE tblp PARTITION OF tbl FOR VALUES IN ('(2,4)'); ALTER TABLE tbl ALTER COLUMN a TYPE char(5); \d+ tbl (The effect depends on the values specified.) It's not exactly the dependency issue but still is related to altering a composite type. Best regards, Alexander