Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iMw7R-0007dV-DE for pgsql-general@arkaria.postgresql.org; Tue, 22 Oct 2019 15:30:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iMw7Q-0002Vn-7W for pgsql-general@arkaria.postgresql.org; Tue, 22 Oct 2019 15:30:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iMw46-0003MU-Eo for pgsql-general@lists.postgresql.org; Tue, 22 Oct 2019 15:27:18 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iMw43-0007pf-Gv for pgsql-general@lists.postgresql.org; Tue, 22 Oct 2019 15:27:17 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C2CB521D2B; Tue, 22 Oct 2019 11:27:14 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 22 Oct 2019 11:27:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=c IAnkEzjPPbzescUi0YQkJ9u8RcO52FQXCWO9Y7UFQE=; b=jW2/ckEcjWA5C7Cdv /pVItkBi6Q3W94ujN9umPbAKm/AfT0RIDlbr6oFlTgrZupNGZk8WkuYq44CStuf+ egUBltdOizgGzBeQjui8UXzEs7Xd1rNO0ota5BRYKVsApD307k/5pQBwEZa3tIVD GEbig8E1MeESOgZEwV5Ixng89xE4U78Ch1AYoUnOoAzEujTA2PDpb+KbFmQ5Z4Wq mUrOuL319/OSKy2B/nXwuL14Wkdf6EW6kWdAsEJpH/xq4i0R+Fu5U7tXN2ToLonV U6jVekpX/+WMb6LkfRvKQ3tBtgYQjDNzFQo75SZ5hVcswsU9KWO36Fc6230o3Kxp oybSw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=cIAnkEzjPPbzescUi0YQkJ9u8RcO52FQXCWO9Y7UF QE=; b=d57gP/ojArOrMbYiS3YZF9ACiUAChRn6Nd2wuA91xKZKzxcWI/m8G/L8x XoDk+RLtjDGwZN598s/n3UyB3xRDJX2cOEKWT/YVVQARbUZHAQWvlys9l4d7Mi30 AngxD+WesJ/qlKg7gzBx1qEZgRr2TDh2NoF9jXOLI9vz6zYkoXGPzPW3S9LZsVta e1qY5VpG1ct6pBqem6lE0XuGkhykNtMZl4eMeJD6/xWxzz2YolvMrG4ezjREPBs4 kMqBNAd4FfNsMd7MrgeG174vYGGJktdOnfmmZ6+vP27mIQCpvsBMkReQ16cAJ/1W hVEBhQPx6bvIAPeQLQ8k9zChOwAIA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrkeejgdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthekre dttdefheenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhmqeenucffohhmrghinhepphhoshhtghhrvghsqh hlrdhorhhgnecukfhppeejuddrvdduvddrudegiedrvdduleenucfrrghrrghmpehmrghi lhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhenucevlh hushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.3] (unknown [71.212.146.219]) by mail.messagingengine.com (Postfix) with ESMTPA id F2ED780061; Tue, 22 Oct 2019 11:27:13 -0400 (EDT) Subject: Re: existing dblinks To: Julie Nishimura , "pgsql-general@lists.postgresql.org" , pgsql-general References: From: Adrian Klaver Message-ID: <75f8b0e6-a6bb-afa6-9cf2-fbede72d531d@aklaver.com> Date: Tue, 22 Oct 2019 08:27:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 10/21/19 3:26 PM, Julie Nishimura wrote: > Hello, is there any way to find if there are any dblink exist on the 9.6 > postgresql server? Are looking for whether the extension was installed? If so then in psql: \dx will tell you. Or are you looking for code that uses dblink? AFAIK dblink creates connections on demand not from information in a persistent store. So there is no table you can query to get the information. You would have to search your code(internal and external) for references to it. If there are open connections you can use: https://www.postgresql.org/docs/11/contrib-dblink-get-connections.html dblink_get_connections — returns the names of all open named dblink connections > > Thanks -- Adrian Klaver adrian.klaver@aklaver.com