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 1kelX2-0007vl-Q8 for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Nov 2020 20:55:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kelX1-0006S0-B1 for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Nov 2020 20:55:23 +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 1kelX1-0006Rt-1I for pgsql-hackers@lists.postgresql.org; Mon, 16 Nov 2020 20:55:23 +0000 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kelWy-00068F-Hc for pgsql-hackers@postgresql.org; Mon, 16 Nov 2020 20:55:21 +0000 Received: by mail-io1-xd2b.google.com with SMTP id s10so18917247ioe.1 for ; Mon, 16 Nov 2020 12:55:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=zM3ONY5O7SR/Ehjx9XkdEkGmcMHyq3DxZ8VerQe+b7o=; b=L3lI7179MLTakmGkBQIVFCzY2cd6aYMXZGZ3Bqzfi3knrLZnf4dV9C89aiFzRc/iLC 0NmJtQTFY5Tof7OOGY9807DB3LsEXAZNuBwyg/uhqVyHVPrQ6t8wtU3MkJh1d1GwoHSx DBd0fses2K0DrxMvESqQnR0io5FlGf/w0Eu3T1WXvJdAJOKeZKFPpMvnRxA1/ftMn9CX /7mjYK6nK2rgURMJkHRZA4VaPqSlrREaUMmx0WCI5YkfaukpvUh7BWO9COE6DzhgJIBW 0BSUb/+7D2HfRYdmCksDQkoWaHoR2J00brloOLphUjpNY3Ya5r8bVA6n+xQ3o5V6sEJe +8Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=zM3ONY5O7SR/Ehjx9XkdEkGmcMHyq3DxZ8VerQe+b7o=; b=TFAcHS2Gv/p7IedbLnsguvfAEkf8dZQcUWIoosQrwJNm/bs95f6CkJ4NCdC02Gbn/N HdrVrrSIHWMMDb4hTne9T+o/J55YdkDUrOQWjknE5FEMfOLcLVnmnWsxOm0IvqsBg8Pw +StUQ3+5SA5dgsf5g97DcOwadpKHPKbAspXvF+pqbEgox6cE74VP+IEHH1rGwNtLvzJv O6WfNpS6K0o2qGPJdDrKsojwIiWZUYa/t3iAgV6ebRkLPXmKqlveB73ECoUtx/gbgeL0 UPHZ2O0fCFhMgwUMFcH0FBTjBlVtQ++cPN0ZfGLI+GLbFIiK/izTRA0LvzUKRpVCoZjh j5BQ== X-Gm-Message-State: AOAM532sGj6pK0rV1OkLbvI/ZNdc/m3aE8Mcyb4j9L/H3yjzAUwE7yiR xZjwfN03REPuJGS7lG81lxNojg== X-Google-Smtp-Source: ABdhPJx6qOl+VKVdjmHQZmY/enZF2Poqvkm0/pF+fcz4kml4OmkkTm7PruiUfO+f/CpG/pef5AglDA== X-Received: by 2002:a5d:9b8f:: with SMTP id r15mr9387094iom.35.1605560119206; Mon, 16 Nov 2020 12:55:19 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id r3sm10046269iot.21.2020.11.16.12.55.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Nov 2020 12:55:18 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 034B780070E; Mon, 16 Nov 2020 14:55:16 -0600 (CST) Date: Mon, 16 Nov 2020 14:55:16 -0600 From: Justin Pryzby To: Stephen Frost Cc: Magnus Hagander , Tom Lane , Peter Eisentraut , Heikki Linnakangas , Ian Lawrence Barwick , PostgreSQL-development Subject: Re: [PATCH] remove deprecated v8.2 containment operators Message-ID: <20201116205516.GM14024@telsasoft.com> References: <20201027032511.GF9241@telsasoft.com> <155ecfd8-7ac6-1875-5090-d79a586a8847@enterprisedb.com> <235561.1605220100@sss.pgh.pa.us> <20201113150343.GT16415@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201113150343.GT16415@tamriel.snowman.net> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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) ? -- Justin