Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tLY7k-00FUJp-6j for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Dec 2024 01:36:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tLY7h-004w8I-N8 for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Dec 2024 01:36:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tLY7h-004w8A-Dy for pgsql-hackers@lists.postgresql.org; Thu, 12 Dec 2024 01:36:14 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tLY7g-002MJm-63 for pgsql-hackers@postgresql.org; Thu, 12 Dec 2024 01:36:13 +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 4BC1aBUr556342; Wed, 11 Dec 2024 20:36:11 -0500 From: Tom Lane To: Andrei Lepikhov cc: PostgreSQL-development Subject: Re: Add Postgres module info In-reply-to: <2c215c98-f713-4c5b-b21a-a4b8fa41890b@gmail.com> References: <506788.1733941263@sss.pgh.pa.us> <2c215c98-f713-4c5b-b21a-a4b8fa41890b@gmail.com> Comments: In-reply-to Andrei Lepikhov message dated "Thu, 12 Dec 2024 07:49:32 +0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <556340.1733967371.1@sss.pgh.pa.us> Date: Wed, 11 Dec 2024 20:36:11 -0500 Message-ID: <556341.1733967371@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andrei Lepikhov writes: > It makes sense. But I want to clarify that I avoided changing > PG_MODULE_MAGIC because the newly introduced structure has a totally > different purpose and usage logic: the struct is designed to check > compatibility, but module info isn't connected to the core version at > all: a single version of the code may be built for multiple PG versions. > At the same time, various versions of the same library may be usable > with the same core. Surely. But I don't see a need for two separately-looked-up physical structures. Seems to me it's sufficient to put the ABI-checking fields into a sub-struct within the magic block. regards, tom lane