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 1kPUDa-0004sS-I8 for pgsql-general@arkaria.postgresql.org; Mon, 05 Oct 2020 17:24:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kPUDZ-0000vz-ED for pgsql-general@arkaria.postgresql.org; Mon, 05 Oct 2020 17:24:09 +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 1kPUDZ-0000vs-6G for pgsql-general@lists.postgresql.org; Mon, 05 Oct 2020 17:24:09 +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 1kPUDX-0005xt-0s for pgsql-general@lists.postgresql.org; Mon, 05 Oct 2020 17:24:08 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 5520C5C0074; Mon, 5 Oct 2020 13:24:06 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 05 Oct 2020 13:24:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=X /fSw3kup+S9hPSTyUN27IJPnUPK8YN/OpNH7ztukq8=; b=NeZ1Wv7mNgYutPEmP 5eIagY89v1pC5yOWY3hbSxmazGBOXmQctusz4xstW5GLYX+XedjioCu8tsJEktI3 +D9e6FeyV7M/CuxpRzcPid8uz3tjwasr0/KIG7ARnG42U10c+6UKZImHE07hZmc4 +bgsECT6ToA3ocSaGRYD8eUOC07UnkzmAyQUimoQFSuCEubtPy866nSUpQJSTBh+ nLj9o8W0KHQYwoXi9HPaiMzu6rrOXAs2T3LbjUMx8GzJW/viw63LAA0+Cm5Nw1X4 qCspZkursRRxFM3Y6xrUNRRHEYf4+BA4JcV/dofUViNWEHWO6PvYKZKYRmijF+S/ j6dvA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=X/fSw3kup+S9hPSTyUN27IJPnUPK8YN/OpNH7ztuk q8=; b=lxYDWIQ9DxaDqUTir76p3XJq2D/SKQ/Bp/No1fOgN4SruZpFhokfb56hk ySrYaeWuz3hjhH1ENFdFNEgUAxS3yrxIN2KujQbQ2/HDQjIMG5YvCDF2Bgv8NznO IZnU7Bbj982pnt7wgwKOWNse2Zxxq2aSvEriHdLWObMzMyVdbCBAaqvohFwRiEp7 f1zHFnpuYoAS0+t1+9NngrebyGjIHWlVHPjUkDNzIXo+aq4yeleUXqunSfh6mRCR ThJHCcr0MxD77C+QR7pdqrw8vU+IxxesW+WFfK8nZ9zGIfJqZGPwiQt0EqocP4QG eWDFa58D0b4nqdeBQplIBrhdT8BbQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrgedvgdduudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepteejvdetff ejuedvleeifeefheeutdfhgfdvhffhhfekvdduveegvdejudefgfevnecukfhppeejgedr leegrdejfedrvddvvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from ranger.suse (unknown [74.94.73.222]) by mail.messagingengine.com (Postfix) with ESMTPA id 25895306467D; Mon, 5 Oct 2020 13:24:05 -0400 (EDT) Subject: Re: UUID generation problem To: byrnejb@harte-lyne.ca, Tom Lane Cc: pgsql-general@lists.postgresql.org References: <271dfd309957472734a7aab8999659b1.squirrel@webmail.harte-lyne.ca> <86544317-8fa2-9193-6af2-6b6e5eab1cba@aklaver.com> <13a362eba18fbef24f8170a3e0cd8a9f.squirrel@webmail.harte-lyne.ca> <1721392.1601909600@sss.pgh.pa.us> <1732745.1601914016@sss.pgh.pa.us> <1778495.1601916688@sss.pgh.pa.us> <403a14de3dc784c868813d275b938866.squirrel@webmail.harte-lyne.ca> From: Adrian Klaver Message-ID: Date: Mon, 5 Oct 2020 10:24:04 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <403a14de3dc784c868813d275b938866.squirrel@webmail.harte-lyne.ca> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 10/5/20 9:59 AM, James B. Byrne wrote: > > > On Mon, October 5, 2020 12:51, Tom Lane wrote: >> "James B. Byrne" writes: >>> [root@accounting-2 ~ (master)]# psql --dbname=idempiere >>> --username=idempiere_dbadmin --host=localhost >>> Password for user idempiere_dbadmin: >>> psql (11.8) >>> Type "help" for help. >> >>> idempiere=# select current_schemas(true); >>> current_schemas >>> ------------------------ >>> {adempiere,pg_catalog} >>> (1 row) >> >>> idempiere=# select uuid_generate_v4(); >>> ERROR: function uuid_generate_v4() does not exist >>> LINE 1: select uuid_generate_v4(); >>> ^ >>> HINT: No function matches the given name and argument types. You might need >>> to >>> add explicit type casts. >>> idempiere=# select public.uuid_generate_v4(); >>> uuid_generate_v4 >>> -------------------------------------- >>> 5ba19b69-ec8e-4d8e-8968-7c84eccc4351 >>> (1 row) >> >> Well, at least here we have consistent results: "public" is not in >> your search_path. (Presumably, "show search_path" would confirm >> that.) The question is what did you do differently before that >> led to the other current_schemas result? If the *only* difference >> is whether you use --host=localhost or not, it's hard to conclude >> anything but that you're connecting to two different databases. >> I don't quite see how that could be, with only one postmaster on >> the machine, but maybe it's time to wonder about rogue connection >> poolers or the like. > > specifying the connection host does not change the observed behaviours. > >> >> It might be worth poking into the pg_db_role_setting catalog, >> which is the most likely source of a different search_path for >> different connections. > > It seems so: > > idempiere=# SELECT * FROM pg_db_role_setting; > setdatabase | setrole | setconfig > -------------+---------+--------------------------------------- > 0 | 21328 | {"search_path=adempiere, pg_catalog"} To confirm what role this is assigned to do: select rolname from pg_authid where oid = 21328; > (1 row) > >> >> Another line of thought is maybe you have a ~/.psqlrc that's >> altering the search_path setting. >> > > Up until 5 minutes ago I did not have a ~/.psqlrc file. And there is no system > psqlrc file. > > -- Adrian Klaver adrian.klaver@aklaver.com