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 1pn5V3-0007Zb-4S for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Apr 2023 22:33:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pn5V2-0002Mu-0U for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Apr 2023 22:33:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pn5V1-0002Jq-Mj for pgsql-hackers@lists.postgresql.org; Thu, 13 Apr 2023 22:33:03 +0000 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pn5Uy-002jQ9-WD for pgsql-hackers@lists.postgresql.org; Thu, 13 Apr 2023 22:33:03 +0000 Received: by mail-qt1-x82e.google.com with SMTP id bn8so14826523qtb.2 for ; Thu, 13 Apr 2023 15:33:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pcorp-us.20221208.gappssmtp.com; s=20221208; t=1681425179; x=1684017179; h=content-language:thread-index:content-transfer-encoding :mime-version:message-id:date:subject:in-reply-to:references:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=rKKt/Ww8WXvBILL3fuLhD06zw0VRP/IjN79gmyMQAMo=; b=nMsV3ZP6L4fwJ35ot2KM9V+xfCZ8djoB1b3Lj9CAKMaimQWoEHV+0oaKo2jhHtRpXc qgGQHkw25IsoN2eRuMRdxJB+lSEG47j+X3V4wdoAsYm6/XALaQCGjFW1tKEQvAS/w8Jl yvG7kowddC57X9frwC6gWdD4W0ju27fcTStlUJJ6kvRTh96n0tZ8mXtA6PuLY2A2hanh HPL5BqlW7Eg38UD9OHcyFDPWwKw630numwQUpjAze9NYcAJWC38+PXjLxRclF5E+AhLK fPFwguoJzP4HP2xXEA3c6S+TfP+dpKGMU1rljSDKFqpBqBEnc10koHRJDj3aXlXYzicr CZrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681425179; x=1684017179; h=content-language:thread-index:content-transfer-encoding :mime-version:message-id:date:subject:in-reply-to:references:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rKKt/Ww8WXvBILL3fuLhD06zw0VRP/IjN79gmyMQAMo=; b=hCgj2voxuGlH8Ihx1FZU5iMtfrvJavB9UvkmbSJkzpSjZNq8dls4uG5fEtMFBNAwEM 9wbQ5k86O5P3o0AKTejpNnJq4X1Wix3N0Z6kqTD+c9bnNj890rdu1jgg/tIOg6UsQygD 6yo4l1B0br+pUomRwrXWKNeRRu2D+/Ddn8on6zGqSbH/HcOIP+Ze3DiCA/qViVIcLx9I 552sWiGYpBLEE9CPI9/jKvFHUFhm3Un67t7jmC4xbnBkH7FIrsQG7iw2JvBFaMSV/Kaj oGBpqmRLiZ7vjXHvOeB8ggMoRSacx9vjqoHuMRNeZRQoVPJ+IoFwRGRlvzODshM+jj0v z1+g== X-Gm-Message-State: AAQBX9dsAZUMkxakMYFdGNqkwXX9EWNHCDym+on/OSg/eWgR0/BcqPS0 nhQC9veQCX0DUxDMVy/a7BIdqQiTrRXQ/c/4tsY= X-Google-Smtp-Source: AKy350aFvYatJacoAnIGZPyWcNOrRZrfI9xOeCM+AVCDsJ94YwgEi3d5mckm361b2v44jvmRVHiwGQ== X-Received: by 2002:ac8:5992:0:b0:3e6:54d2:a2c5 with SMTP id e18-20020ac85992000000b003e654d2a2c5mr5918517qte.10.1681425178991; Thu, 13 Apr 2023 15:32:58 -0700 (PDT) Received: from F (50-78-240-110-static.hfc.comcastbusiness.net. [50.78.240.110]) by smtp.gmail.com with ESMTPSA id g3-20020ac84b63000000b003e3910db4f1sm805174qts.35.2023.04.13.15.32.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Apr 2023 15:32:58 -0700 (PDT) From: "Regina Obe" To: Cc: "'Yurii Rashkovskii'" , "'Tom Lane'" , "'Regina Obe'" , References: <20221117095734.igldlk6kngr6ogim@c19> <166914379479.1121.7549798686571352890.pgcf@coridan.postgresql.org> <55512.1673304709@sss.pgh.pa.us> <20230409204629.sf4fptx672iehcau@c19> <000501d96c23$0f05bdf0$2d1139d0$@pcorp.us> <20230411184823.s3cctaf63qvfeqlj@c19> <006201d96cb5$3d23b150$b76b13f0$@pcorp.us> <20230411212737.phtzffycglbdhmpx@c19> In-Reply-To: Subject: RE: [PATCH] Support % wildcard in extension upgrade filenames Date: Thu, 13 Apr 2023 18:32:55 -0400 Message-ID: <002201d96e57$e50461a0$af0d24e0$@pcorp.us> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQGYmaaUCwtlrmE55CHyCSUXu9VHkgKopfE4AVtxnv8DArAuyQGfbhARAm8A8U4CpUA3zwGDW9/EAvd7mHsCV9qbi68HDEvQgAAGLPA= Content-Language: en-us List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > Here are my thoughts of how this can work to satisfy our specific needs and > that of others who have many micro versions. > > 1) We define an additional file. I'll call this a paths file > > So for example postgis would have a > > postgis.paths file > > The format of the path file would be of the form > > , => 3.3.0--3.4.0 > > It will also allow a wildcard option > % => ANY--3.4.0.sql > > So a postgis.paths with multiple lines might look like > > 3.2.0,3.2.1 => 3.2.2--3.3.0 > 3.3.% => 3.3--3.4.0 > % => ANY--3.4.0 > > 2) The order of precedence would be: > > a) physical files are always used first > b) If no physical path is present on disk, then it looks at a .paths > file to formulate virtual paths > c) Longer mappings are preferred over shorter mappings > > So that means the % => ANY--3.4.0 would be the path of last resort > > Let's say our current installed version of postgis is postgis VERSION 3.2.0 > > The above path formulated would be > > 3.2.0 -> 3.3.0 -> 3.4.0 > The simulated scripts used to get there would be > > postgis--3.2.2--3.3.0.sql > postgis--3.3.0--3.4.0.sql > > > This however does not solve the issue of downgrades, which admittedly > postgis is not concerned about since we have accounted for that in our > internal scripts. > > So we might have issue with having a bear: %. If we don't allow a bear % > > Then our postgis patterns might look something like: > > 3.%, 2.% => ANY --3.4.0 > > Which would mean 3.0.1, 3.0.2, 3.2.etc would all use the same script. > > Which would still be a major improvement from what we have today and > minimizes likeliness of downgrade footguns. > > Thoughts anyone? > Minor correction scripts to get from 3.2.0 to 3.4.0 would be: postgis--3.2.2--3.3.0.sql postgis--3.3--3.4.0.sql