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 1mYWhq-0001Au-Mg for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Oct 2021 16:57:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mYWho-0006GQ-Ly for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Oct 2021 16:57:16 +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 1mYWh3-00028d-O6 for pgsql-hackers@lists.postgresql.org; Thu, 07 Oct 2021 16:56:30 +0000 Received: from anastigmatix.net ([68.171.219.55]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYWh1-0002Gf-5U for pgsql-hackers@lists.postgresql.org; Thu, 07 Oct 2021 16:56:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=anastigmatix.net; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dwDDUMb/+OCcxRiQmt/WWnYOJ2ga/7695VN0M2dgV24=; b=NcCko3N3Qh5cg3ac3C/f3sWO46 iDEdUMFf+dcOTD/g0m6YB+0VlSQTu+4/VIdLULOeZS0/EkaBWDAppVNLNud3ZOmauY8HGD04BbUN/ S5c5jOxeF4hrlTpV5Ww2DM7nyxdGtYC4FaJ7slXcA9RDj1Af3RB6L+9JH2sWEMTOyEmXuSRuBGbSG PocrJQkGC6MgqdNRNDjAJsnXO7ejx2m6vOsbprZL7KGgTgdxcl4+snpErHv223abHoXIy2VVok9wl i1xJgNNzO1ynAN/MTAy8zUVvvb+Qc1QG1i6Ul1Bbw5bQXnp9zIBKfW4OoC7XaBEgce68Apl+yzFkj dPcfGCDg==; Received: from [184.19.31.139] (port=41897) by bay.acenet.us with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1mYWgy-001V33-Mg; Thu, 07 Oct 2021 12:56:25 -0400 Subject: Re: dfmgr additional ABI version fields To: Tom Lane , Andres Freund References: <55215fda-db31-a045-d6b7-d6f2d2dc9920@enterprisedb.com> <65011.1633621797@sss.pgh.pa.us> <45ED8985-0756-4FE3-B651-0EC431CF1445@anarazel.de> <82163.1633624943@sss.pgh.pa.us> Cc: pgsql-hackers@lists.postgresql.org, Peter Eisentraut , pgsql-hackers From: Chapman Flack X-Enigmail-Draft-Status: N1110 Message-ID: <615F26B6.1020805@anastigmatix.net> Date: Thu, 7 Oct 2021 12:56:22 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <82163.1633624943@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bay.acenet.us X-AntiAbuse: Original Domain - lists.postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - anastigmatix.net X-Get-Message-Sender-Via: bay.acenet.us: authenticated_id: chap@anastigmatix.net X-Authenticated-Sender: bay.acenet.us: chap@anastigmatix.net X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/07/21 12:42, Tom Lane wrote: > Can we make the addition be a string not a number, so that we > could include something more useful than "1234" in the error > message? I was wondering the same thing, just to sidestep the "who hands out IDs" question. Just using a string like "EDB v" + something would probably rule out collisions in practice. To be more formal about it, something like the tag URI scheme [0] could be recommended. Nothing at runtime would have to know or care about tag URI syntax; it would just match a string with a fixed opaque prefix and some suffix. The scheme gives the developer an easy way to construct a meaningful and reliably non-colliding string. Surely loading libraries isn't a hot enough operation to begrudge a strcmp. Regards, -Chap [0] https://datatracker.ietf.org/doc/html/rfc4151