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 1tQyrf-006UAg-9I for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Dec 2024 01:10:07 +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 1tQyrd-0061b4-Nv for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Dec 2024 01:10:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tQyrd-0061aw-C9 for pgsql-hackers@lists.postgresql.org; Fri, 27 Dec 2024 01:10:05 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tQyra-001nM4-G5 for pgsql-hackers@postgresql.org; Fri, 27 Dec 2024 01:10:04 +0000 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-21634338cfdso116614835ad.2 for ; Thu, 26 Dec 2024 17:10:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735261800; x=1735866600; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=jlcYHKeoHZw+BIWYyjoyJMvmsnxu0Myt1xK9k38K8fE=; b=Zeuknry1l2/jJdR9LEkO4G2Tt9VwBuhUenYnQQCtue4mQeaNy2mWgnBpVjJ0Lrtj6O DKeo68V8stj3HyI6xkZ0gidXSFcJa5nxIKL9TBN50LdU2RainEV4FJddspWW9e5rVN7L 2fHxbeLCVViZoYwVQv955ARKBKqj7npCnrfmpgnF/0o9bd0D4sucp8dfaYY81RgZ3zxm o00JjdNIQOdZdfIQoWdzAkE7JUqGZ889a4K7NKA8GykJ/hF6thnWUhnGbtXs0b37aLRD SpAUZ9aHDcXJE9+i+8I3qE6bVqJzcADzrHXJFislTTaHZidy2KeMY/jtS/KJckKgFLaP DMIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735261800; x=1735866600; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jlcYHKeoHZw+BIWYyjoyJMvmsnxu0Myt1xK9k38K8fE=; b=TEJewFp/TkfoGWThAi1f5Ep+5OaZKdRvGTuAGRXoku1dmDRDDaWABlGTvltVO2h3VR UngLXJjyvkcU1M7mvqaoigUk6r0AwnhANAXh3YR603eDuam1rMhXfYYq4sLoziw4UV57 YfBn5uMp/DYU+gxBmckb3OCWhwnWmH2SzbXgPGUQP8Yl/uDp+PHbFIOXBM5OWg65nKUw Fl8hnv3YCcArnH3r6LSSw6x0p48hqDL+hPpX8qXlwggThC6ouRTKb5NSm3AblpdcaA6i RWZd4d2yEG0C9xesUm6ap0M8RDGeuqESl7iW0HSIffdCWKGMtu+sxbEpOTcNmF8OOZCM MoMA== X-Forwarded-Encrypted: i=1; AJvYcCV11IxGL3cGzxUA12zBpyWxcRwoUCzlSUErMI0Klub91mGzwVdqj2Q89w6s57885tnA0OciFC9DUgpShRPQ@postgresql.org X-Gm-Message-State: AOJu0YxOW56n5sdRCSKgLjH34KP4mK5q9wMEiMjV1FCQ/dYVvnptBBY9 cE0bY+uVaN/1zeCOX4w+icHxE+T+/f2bHF5Zc5R5BfDXQQKnSiYM X-Gm-Gg: ASbGncuyQV5dsHWL99nWItqQH+ow2crDoPhW8N/CPyvCsrHa4mvJd5c7GHSuVUawUnV C2ypc2nZFp3sHGng8Eoh0xvnQtTZ7p96Ws1svYchv6N4WirkwSgbt37NmaN13V7ZZrch1R2E6I9 5iWb2Bj2RoDBWpL1KBnSL3zNoldV3CLgf6AsvFIgw0jIp7R7+SpzgFtMnHsZ9bgFU9giL8sJ21s 0prHpBxbdpcxpsbTL3McFdumYtyFr07jSfOSshh38GlIF4t6KD+1c0cLuFOjqdV76KixEfpXa3Y TicXaN4YoSp25Tc7MSuswkffNT74DOqg X-Google-Smtp-Source: AGHT+IGK+MehuVrkEgy2+SMZPMc6F9ydboJiaLvYhmuLoUfKFDcCj0LSzsaOM7pTI0SFSFYhnNmaLQ== X-Received: by 2002:a05:6a21:7896:b0:1e0:cf39:846a with SMTP id adf61e73a8af0-1e5e07e79aamr40297298637.29.1735261800366; Thu, 26 Dec 2024 17:10:00 -0800 (PST) Received: from [10.10.20.106] (node-o24.pool-125-26.dynamic.totinternet.net. [125.26.121.204]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-869bba80047sm9502111a12.44.2024.12.26.17.09.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 Dec 2024 17:09:59 -0800 (PST) Message-ID: <0edb788c-7376-4785-ae41-4544ad9bc57b@gmail.com> Date: Fri, 27 Dec 2024 08:09:55 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Add Postgres module info To: David Wheeler , Euler Taveira Cc: Andres Freund , Tom Lane , pgsql-hackers References: <506788.1733941263@sss.pgh.pa.us> <2qdclwljzvw5abfvo4porr3ehox32icrbtfjaum327ruxts6qm@udexcbweewpq> <51416962-9118-41D7-B527-F99D81CF2B57@justatheory.com> <4b5b73e2-3edd-496c-8dc1-a50c144937ae@gmail.com> Content-Language: en-AU From: Andrei Lepikhov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12/27/24 01:26, David Wheeler wrote: > On Mon, Dec 23, 2024, at 8:49 PM, Andrei Lepikhov wrote: > >> Looking into the control file, I see that most parameters are >> unnecessary for the library. Why do we have to maintain this file? > Well, either way you have to load the extension, either CREATE EXTENSION to load an SQL extension (and any related shared modules), or LOAD or *_preload_libraries to load a shared module. I propose to add support for shared-module-only extensions to CREATE/UPDATE/DROP EXTENSION. It would then both insert the version info in the database (from the control file, at least), and load the shares module(s). I still can't get your point. We intentionally wrote a library, not an extension. According to user usage and upgrade patterns, it works across the whole instance and in any database or locally in a single backend and ends its impact at the end of its life. Also, it doesn't maintain any object in the database and is managed by GUCs. For example, my libraries add query tree transformations/path recommendations to the planner. It doesn't depend on a database and doesn't maintain DSM segments and users sometimes want to use it in specific backends, not databases - in a backend dedicated to analytic queries without extra overhead to backends, picked out for short queries. For what reason do I need to add complexity and call 'CREATE EXTENSION' here and add version info only in a specific database? Just because of a formal one-directory structure? -- regards, Andrei Lepikhov