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 1mYVeq-0007Ob-Hk for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Oct 2021 15:50:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mYVep-00033a-AV for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Oct 2021 15:50:07 +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 1mYVep-00033S-2k for pgsql-hackers@lists.postgresql.org; Thu, 07 Oct 2021 15:50:07 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYVei-00045q-Sw for pgsql-hackers@postgresql.org; Thu, 07 Oct 2021 15:50:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 197FnvtY065012; Thu, 7 Oct 2021 11:49:57 -0400 From: Tom Lane To: Peter Eisentraut cc: pgsql-hackers Subject: Re: dfmgr additional ABI version fields In-reply-to: <55215fda-db31-a045-d6b7-d6f2d2dc9920@enterprisedb.com> References: <55215fda-db31-a045-d6b7-d6f2d2dc9920@enterprisedb.com> Comments: In-reply-to Peter Eisentraut message dated "Thu, 07 Oct 2021 11:27:48 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <65010.1633621797.1@sss.pgh.pa.us> Date: Thu, 07 Oct 2021 11:49:57 -0400 Message-ID: <65011.1633621797@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Eisentraut writes: > I'm thinking about adding two more int fields to Pg_magic_struct: a > product or vendor magic number, and an ABI version that can be used > freely within a product/vendor. Who would hand out these magic numbers? If the answer is "choose a random one, it probably won't collide" then I'm not sure why we need two fields. You can choose a new random number for each ABI version, if you're changing it faster than once per PG major version. I'm also kind of unclear on why we need to do anything about this in the community version. If someone has forked PG and changed APIs to the extent that extensions are unlikely to work, there's not much stopping them from also making the two-line change to fmgr.h that would be needed to guarantee that different magic struct contents are needed. regards, tom lane