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 1kjoGg-00015I-1w for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Nov 2020 18:51:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kjoGe-00014x-Re for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Nov 2020 18:51:20 +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 1kjoGd-000140-Vo for pgsql-hackers@lists.postgresql.org; Mon, 30 Nov 2020 18:51:20 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kjoGZ-0005eA-5L for pgsql-hackers@postgresql.org; Mon, 30 Nov 2020 18:51:18 +0000 Received: from [192.168.1.70] (ppp91-79-61-252.pppoe.mtu-net.ru [91.79.61.252]) (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 D043D21C2FAC; Mon, 30 Nov 2020 21:51:12 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1606762272; bh=onVRMg+Q9KvgTNhEcww8cp2s9DxjGW8rjK8n5iszs/I=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=aPFAxH2sFPnrjxdwpFMU5/G8Zmernx0BsilYlrpKNPr+qlilCZOYo0oW8nNTlgHRJ jlowYf5nnpQ8KAl445K3vQugMREDkLw5ai8WQzIjhTcI1DvSQSGZ+7TK7ZR65JRqcZ YMGhyrX/Uf74b2Zv9E+ShWyh6lCahiwx1l6r7FR8= Subject: Re: [PATCH] remove deprecated v8.2 containment operators To: Justin Pryzby , Stephen Frost Cc: Magnus Hagander , Tom Lane , Peter Eisentraut , Heikki Linnakangas , Ian Lawrence Barwick , PostgreSQL-development References: <20201027032511.GF9241@telsasoft.com> <155ecfd8-7ac6-1875-5090-d79a586a8847@enterprisedb.com> <235561.1605220100@sss.pgh.pa.us> <20201113150343.GT16415@tamriel.snowman.net> <20201116205516.GM14024@telsasoft.com> From: Anastasia Lubennikova Message-ID: Date: Mon, 30 Nov 2020 21:51:12 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201116205516.GM14024@telsasoft.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 16.11.2020 23:55, Justin Pryzby wrote: > On Fri, Nov 13, 2020 at 10:03:43AM -0500, Stephen Frost wrote: >> * Magnus Hagander (magnus@hagander.net) wrote: >>> On Thu, Nov 12, 2020 at 11:28 PM Tom Lane wrote: >>>>> The changes to the contrib modules appear to be incomplete in some ways. >>>>> In cube, hstore, and seg, there are no changes to the extension >>>>> scripts to remove the operators. All you're doing is changing the C >>>>> code to no longer recognize the strategy, but that doesn't explain what >>>>> will happen if the operator is still used. In intarray, by contrast, >>>>> you're editing an existing extension script, but that should be done by >>>>> an upgrade script instead. >>>> In the contrib modules, I'm afraid what you gotta do is remove the >>>> SQL operator definitions but leave the opclass code support in place. >>>> That's because there's no guarantee that users will update the extension's >>>> SQL version immediately, so a v14 build of the .so might still be used >>>> with the old SQL definitions. It's not clear how much window we need >>>> give for people to do that update, but I don't think "zero" is an >>>> acceptable answer. >>> Based on my experience from the field, the answer is "never". >>> >>> As in, most people have no idea they are even *supposed* to do such an >>> upgrade, so they don't do it. Until we solve that problem, I think >>> we're basically stuck with keeping them "forever". (and even if/when >>> we do, "zero" is probably not going to cut it, no) >> Yeah, this is a serious problem and one that we should figure out a way >> to fix or at least improve on- maybe by having pg_upgrade say something >> about extensions that could/should be upgraded..? > I think what's needed are: > > 1) a way to *warn* users about deprecation. CREATE EXTENSION might give an > elog(WARNING), but it's probably not enough. It only happens once, and if it's > in pg_restore/pg_upgrade, it be wrapped by vendor upgrade scripts. It needs to > be more like first function call in every session. Or more likely, put it in > documentation for 10 years. > > 2) a way to *enforce* it, like making CREATE EXTENSION fail when run against an > excessively old server, including by pg_restore/pg_upgrade (which ought to also > handle it in --check). > > Are there any contrib for which (1) is done and we're anywhere near doing (2) ? > Status update for a commitfest entry. The commitfest is nearing the end and this thread is "Waiting on Author". As far as I see we don't have a patch here and discussion is a bit stuck. So, I am planning to return it with feedback. Any objections? -- Anastasia Lubennikova Postgres Professional: http://www.postgrespro.com The Russian Postgres Company