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 1lybC3-0004Ix-CP for pgsql-admin@arkaria.postgresql.org; Wed, 30 Jun 2021 14:27:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lybC1-0005PY-9F for pgsql-admin@arkaria.postgresql.org; Wed, 30 Jun 2021 14:27:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lybC0-0005PP-U9 for pgsql-admin@lists.postgresql.org; Wed, 30 Jun 2021 14:27:57 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lybBw-0000o7-Kj for pgsql-admin@lists.postgresql.org; Wed, 30 Jun 2021 14:27:55 +0000 Received: by mail-ej1-x635.google.com with SMTP id hr1so1139957ejc.1 for ; Wed, 30 Jun 2021 07:27:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=bsRtllOB7L2ktZCUXaGYDUt3FIMeG+NW+PHFm90elTk=; b=tebOlOaWhLC3A2te+HKbgX+Uv+aGh0bLBjGuYFxSHlhxksiuXZJMtO/oLkABZ/DIPx N/d+qmE+EzGbhZf4vZjeT3v2EUdXlYCwiiw4oCLvWQ2TuAKrkEY8DQ4onYKfKqbLXgSq KHeTdMu//Z9+9y2CWDiHMPieXIuD3wzyt+KaRZgeVuWGc269OJ8oPYZo+/69PJsY/O0C BK1mzt1Ig9/aKhNcHvW+YZnBjZpUBsLBID6+gsnHgKHCHS1h56nzHoCJfJKMIPPF2xg/ Wh2HyoBWEjtZZwsLFmM8vhZOx5Lntj1ZyV9Q0Vb53MmKfQTTfES1PSLDKMCpoLa1pzLo nFOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=bsRtllOB7L2ktZCUXaGYDUt3FIMeG+NW+PHFm90elTk=; b=cr/eyAczODvuiQDhlVXzu6hHobMOOVjbKhi1bP9FTOcMF18Hu0aKKSEw7qN8c0tI8U P59h0+V85c2V3PcQYNMFoBWpssXVSeQJie4bYK1w8/DjFYS/Nm1mpd5D1K6Zk9BiqRRn spGcNHii4E37rjJPMBImNfUhPhpcbmvFPZFomompCz7rpFGsHz77WVRTuoRHbLSYZ+qp /bOI4gI9z/rGfrDv6ioOoDAYqueOxSi7qqYy28vMKpbPIl3R/Xokktm8u6RHyQSM0NyK CyCoiL7j30d+a3A7zcNR45lXcTcDGAzRSnkAuFKeqH7CLNuySARY3MRPts+mZ5BXNI1g w4Pw== X-Gm-Message-State: AOAM531EJY87/QRtIf2zcMrIOB8tHZALk0l0zgAuGQH+HOOnyRCpYfk6 9mkqAmHkipHr70tgNJ6lEC2+fQ== X-Google-Smtp-Source: ABdhPJywLc88zhn3TRYXKHU2WTDxsb9Vbzf9dbGVOY8HXn2Dl/21It01dKIJd7Xr1E2TWOkRgm8kpA== X-Received: by 2002:a17:906:3b87:: with SMTP id u7mr35540753ejf.330.1625063270584; Wed, 30 Jun 2021 07:27:50 -0700 (PDT) Received: from localhost.localdomain (217-149-171-48.nat.highway.telekom.at. [217.149.171.48]) by smtp.gmail.com with ESMTPSA id b25sm13119916edv.9.2021.06.30.07.27.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 07:27:50 -0700 (PDT) Message-ID: Subject: Re: Check if installed extension is in use From: Laurenz Albe To: Christian Lehmann , pgsql-admin@lists.postgresql.org Date: Wed, 30 Jun 2021 16:27:49 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2021-06-30 at 16:14 +0200, Christian Lehmann wrote: > Now my question: Is it possible to see if a certain extension is in > active use? BEGIN; DROP EXTENSION plpython3u; ROLLBACK; If you can drop the extension, no objects depend on it. For example, that will show if there are any PL/Python functions defined. If you want to know if PL/Python functions are used, monitor "pg_stat_user_functions" (after enabling "track_functions") and see if the number of calls is growing. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com