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 1tLavn-00FmGO-Hu for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Dec 2024 04:36: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 1tLavj-006qhu-Hb for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Dec 2024 04:36:04 +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 1tLavi-006qhm-WB for pgsql-hackers@lists.postgresql.org; Thu, 12 Dec 2024 04:36:04 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tLavh-002Noa-ND for pgsql-hackers@postgresql.org; Thu, 12 Dec 2024 04:36:03 +0000 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-725f4623df7so149275b3a.2 for ; Wed, 11 Dec 2024 20:36:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733978161; x=1734582961; 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=Hon4bphdPaK4v4bhO6ibF3k8rABnOuXSQUk9I6e8iX4=; b=G760hlBykwePWSk4IKayOncW2d+JZA9X98MrSY5Q/KSpyz3XIajKBFPx9R0QRmv4lG 6Arx4XLbX8f7jAB449XTVR4/3g8Nb/T1f/T/rMY1lWibJ4vQGkImpEgP5oY9t3BstsHD xxEKU01SQUOwsbA6UL36SbqWBhkbljSKuFs41EarWnYR+uqaAzhjDh1lUnlwIqQI3llG ef7UAuHvJlTKm2/MlyrTZEUsOLhLacJFBi1XglYBN4798hjrouD6wc2B8/S+J265rrSc EGANAejsDcPksiM1DOAsfDA6uoSCWezOMQRln2xOHVA4NnXqTpqpk2HBg2DdwMo3A/V5 hS+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733978161; x=1734582961; 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=Hon4bphdPaK4v4bhO6ibF3k8rABnOuXSQUk9I6e8iX4=; b=rj8QkGZygXcF/4ogRFYUObRg00NFdu3HyYYbIWFD1759vCTSrk4wqWTS0u4RWY3Rx4 0CKIqlTabv0alId/fUbWGlMEFxF2d7x+kv7CQDk91pTOzsbHDA6evU5rSXOCVeihCurk olJ59wScVHHETGnjjbZjUhiSqbm/Drc3futl0nCEGEh3utPbCIIb9YiCw2nixNfTE4sv Ux64ff3M2bPteF6tDsHMUf+6fWeqLv4QgCuAjA8fe4/N0MGyTQ8LoBjBFGAbyudN/YOw JveqKoJJIGUZAW0JW0aLHE1vql8lobrpaCqn4shc8JHyLDWeV2rOV77aWOhuzCo85+PA V1tQ== X-Forwarded-Encrypted: i=1; AJvYcCWViup01CUpctqf/naWhzR4JO5bY1wyVmpiJy86ayHFyMOJx1qm98CDe48tyJu8BCBGFwmt1IQDLYL3Teah@postgresql.org X-Gm-Message-State: AOJu0Ywu6ID+kVvEvWEv9ekRhu4NU/yTm+8OhwHIPpFW5u7a+8uFKK4G IwFfQJAsw/d26i0kWNSXD8/ya8XlvJFB/TiEsa72awYyruzwfAuPdo4jj1+TQu4= X-Gm-Gg: ASbGncu4mN7iO30DrYHY16w/vqrfQU5d9s4LVxWKuSPwxp8Q1t+7pkc9JNFI0dUoUDQ J6/ZCZQCUFrh1khTmdnStO1NgERgIJrA6NJpuOXcQTA3EwV+VlqkEnbVCuNJnPqL+5n0kbOzJnR qia2U6qWyKHhrUmJPR66ohO6i9+G/0A0JnzQz71oxbVLb9B4sadaPq7tRgndbl7HZn7mDNR17hB x6fjalfcT17P2Bn/6paYe9Ekew///7lMrVBjDwsBjrMFZMcKhIUPPlSDIEcc/mRL2+bf1s1pEsz VYyibhnNyujGsalD9zGxzoGJU3Ok3g== X-Google-Smtp-Source: AGHT+IEW6a3k75jl6jevpBftfybcMuyipHCvjcaZHBRv+I9WMHlS3zfsdp3QSMfhbJNF6bIHd0kHFg== X-Received: by 2002:a05:6a21:32a3:b0:1d9:2705:699e with SMTP id adf61e73a8af0-1e1cea7e933mr3427226637.7.1733978160599; Wed, 11 Dec 2024 20:36:00 -0800 (PST) Received: from [10.10.20.106] (node-gmq.pool-125-27.dynamic.totinternet.net. [125.27.84.50]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7270270c37bsm5356414b3a.118.2024.12.11.20.35.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Dec 2024 20:36:00 -0800 (PST) Message-ID: Date: Thu, 12 Dec 2024 11:35:56 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Add Postgres module info To: Michael Paquier , Tom Lane Cc: Euler Taveira , Andres Freund , pgsql-hackers References: <506788.1733941263@sss.pgh.pa.us> <2qdclwljzvw5abfvo4porr3ehox32icrbtfjaum327ruxts6qm@udexcbweewpq> <556165.1733967268@sss.pgh.pa.us> <570943.1733974778@sss.pgh.pa.us> 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/12/24 10:44, Michael Paquier wrote: > On Wed, Dec 11, 2024 at 10:39:38PM -0500, Tom Lane wrote: >> Michael Paquier writes: >>> Presumably, >>> the extra tracking can be done in dfmgr.c with more fields added to >>> DynamicFileList to track the information involved. >> >> I wouldn't add any overhead to the normal case for this. Couldn't >> we walk the list and re-fetch each module's magic block inside >> this new function? > > Depends on how much we should try to cache to make that less expensive > on repeated calls because we cannot unload libraries, but sure, I > don't see why we could not that for each SQL function call to simplify > the logic and the structures in place. I want to say that 'cannot unload libraries' is a negative outcome of the architecture. It would be better to invent something like PG_unregister, allowing libraries to at least return a hook routine call back to the system. So, maybe it makes sense to design this feature with re-fetching libraries, supposing it is already implemented somehow and elements of the DynamicFileList may be removed. -- regards, Andrei Lepikhov