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 1tPu2o-00GAbC-QT for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Dec 2024 01:49:11 +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 1tPu2o-000LRt-31 for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Dec 2024 01:49:09 +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 1tPu2n-000LQF-PA for pgsql-hackers@lists.postgresql.org; Tue, 24 Dec 2024 01:49:09 +0000 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tPu2m-000Gyj-0m for pgsql-hackers@postgresql.org; Tue, 24 Dec 2024 01:49:08 +0000 Received: by mail-pj1-x1034.google.com with SMTP id 98e67ed59e1d1-2ee67e9287fso4512555a91.0 for ; Mon, 23 Dec 2024 17:49:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735004947; x=1735609747; 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=SjgHYq0IjPBYSk0RbBOTXYGTx53J4nTs1fbJufpXbIg=; b=AOV1oqPFbWhLfhtUSy0bL0Fe43pxt1BAzvQkoJVBVlYhlWeCgZLS7l7TK7c6HrHqZT 5FcGKLF9HjOozZEgASshic7nCjo6+LBfRHXwI8lcoGTYOW47A/AxjKlD4tj8WUVTWe98 g5XOFGf20pJXNeRJUBR3wYc1mkXjQHlT7pG56hVMdLD7FFPObweFKlagjx9e74aTU17m 2wDf+5lc7UlMuoF342XHopclv6hDKOwIvnXiB3MuHf0NIuKw4POcFvGU4l4bu82OZqEI Q2zWeuKeOHlppKLTEexbX4YLXnVYUjoum2osczPr4QOvioK3Qbote4EAtdofNoqlKIba Jb8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735004947; x=1735609747; 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=SjgHYq0IjPBYSk0RbBOTXYGTx53J4nTs1fbJufpXbIg=; b=upssIC4wCcAaYswD9DZFtBfPH07ie5ygY+y7wuyF1XrqX5gtE8615wG+oPUfBgF6eG 5/mMkPYxf8SfTCfDG65vg+ZukTX2P2anPLmS/VcfuFSQTlRx8Q/+6TSqdSrjnYp110sL vtaSZzjBk+Pvu+E4+DBN6cfXilK1vopzGpe62xXDeHjH/3DFDmCXcUY94wOBmQkUJPmP dlTOwymbzuKVXPHGG9Lcik26rnl3RTx18VjDM66CHb2em+r8wJa9cU8x9zPntu6Te8rb PEINGm0A4xONICtiksIi/xT48ekJPSHmY2BgcPzppM3D25QsWrVTsLezwez0D260/Q7U Q6/A== X-Forwarded-Encrypted: i=1; AJvYcCWmZiYVqWLav1bEHL2QT3eQFopxMMq6BvZQcVm/oFAcVxr6ICe9gkBAtk8rALGfRNuILJv6o653VNJz1ygw@postgresql.org X-Gm-Message-State: AOJu0Yx5OMVep1gXdYhXNNEV7yuBsKgNtmZnRj6+rDNha+uRLBPlCMvh lVm4zCscu2pKJrYs+o28gwF56Bt7YHDeJ+TnL9sSgMDhQTc5BQLi X-Gm-Gg: ASbGncsgeYnXbaYLpLji6Zt9AadAKCe13LIThLyr1Yr5QDnC1Y2IoeMbp6gnlflWZbw QBX2yWT5AavtZd6qzlHJqrdfzRDst4WxoAfpOdc2e8GvbPcHLsu1DBrD5ceSf627at9FnFYnixq QtVGU2AvybxrsDLsZlg1Fmvjr2lAYaCzlWIXpcaCAL/sz5i3hwra3iEyNrzYl5N1JP+mSoW0qhI KcxQrsXW+bRXVoRNgn+/XJXRTdl3f5Q0ffS+FUr92SaqskX2ZWYCjLbjv93ApUcez2nESrvladp km7tveWlwm6b5qnOVLVVRkjoJ0KFg9A= X-Google-Smtp-Source: AGHT+IEifv60IUoaNtd5DJT+osDTGckeUoAf6rWZndCeG2nB700jngdQFUPG6WeK9X64YBJtR/4VlA== X-Received: by 2002:a17:90a:c2c7:b0:2ee:d193:f3d5 with SMTP id 98e67ed59e1d1-2f452debe41mr23817860a91.7.1735004947115; Mon, 23 Dec 2024 17:49:07 -0800 (PST) Received: from [10.10.20.106] (node-i9k.pool-125-27.dynamic.totinternet.net. [125.27.92.120]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9d4645sm80018025ad.168.2024.12.23.17.49.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Dec 2024 17:49:06 -0800 (PST) Message-ID: <4b5b73e2-3edd-496c-8dc1-a50c144937ae@gmail.com> Date: Tue, 24 Dec 2024 08:49:02 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Add Postgres module info To: "David E. 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> Content-Language: en-AU From: Andrei Lepikhov In-Reply-To: <51416962-9118-41D7-B527-F99D81CF2B57@justatheory.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12/24/24 02:23, David E. Wheeler wrote: > On Dec 11, 2024, at 19:49, Euler Taveira wrote: > >>> FWIW, Id like to have some more information in there, without commenting on >>> the specifics. >> >> +1 for the general idea. > > Same. > >> I received some reports like [1] related to wal2json >> that people wants to obtain the output plugin version. Since it is not installed >> via CREATE EXTENSION, it is not possible to detect what version is installed, >> hence, some tools cannot have some logic to probe the module version. > > I’m all for additional metadata for native extensions, but I’d also like to draw attention to the “Future” section my proposal[1] to require that module-only extensions also include a control file and be loadable via CREATE EXTENSION (and proposed *_preload_extensions GUCs[2]). This would unify how all types of extensions are added to a database, and would include version information as for all other CREATE EXTENSION extensions. Looking into the control file, I see that most parameters are unnecessary for the library. Why do we have to maintain this file? In my experience, extra features are usually designed as shared libraries to 1) reduce complexity, 2) work across the overall cluster, 3) be dynamically loaded, 4) be hidden, and not waste the database with any type of object. - remember, applications sometimes manage their data through an API; databases and any objects inside may be created/moved automatically, and we want to work in any database. The 'CREATE EXTENSION' statement would have made sense if we had register/unregister hook machinery. Without that, it seems it is just about maintaining the library's version and comments locally in a specific database. It would be interesting to read about your real-life cases that caused your proposal. -- regards, Andrei Lepikhov