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 1kPWG6-0000hz-Mu for pgsql-general@arkaria.postgresql.org; Mon, 05 Oct 2020 19:34:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kPWG5-0002FW-Lm for pgsql-general@arkaria.postgresql.org; Mon, 05 Oct 2020 19:34:53 +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 1kPWG5-0002CX-EQ for pgsql-general@lists.postgresql.org; Mon, 05 Oct 2020 19:34:53 +0000 Received: from [64.147.123.19] (helo=wout3-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPWG0-00072R-VS for pgsql-general@lists.postgresql.org; Mon, 05 Oct 2020 19:34:52 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 950FE165C; Mon, 5 Oct 2020 15:34:37 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 05 Oct 2020 15:34:37 -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=+ dlpMJr4cW4SrVHnBtvOmOjmRckUwIjGfS5hV5NNYC0=; b=RYjyD4dyqIbf4OV/Q fmY85ucBMR2uHSb/yYg6ZWgFIBudOT2gZMnue41/vMgdIKiFmfv6Nhr9ipByJLuW sGk5m3eShJU5WxwXqn0ErowcGqiXgCcUGTym3yhKAI8ZEHjHmDVjpbaVVfNSmqfB u3ox3arhpYt7D5e6x1YmoNpE34T9+SSq64+zoWG5WCfdEcUtpi6U06imY7pnN719 hpIJ9jWbh9b0GEAwY4McXK3AwdYCWOoHmTXUiZ0DrIimhs+nugv1uhc928NoSOf/ rRlBIFNS8iMpsYeQAPWJqZ3gAqh5Pql81vv7bWtrgOFGdWZJeckZhLHFV8O25/tM lIEyg== 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=+dlpMJr4cW4SrVHnBtvOmOjmRckUwIjGfS5hV5NNY C0=; b=az0lgCktfmjx4n5rIcpHmhQ05uit/swGdh1eaebmSUhoXZh1FY5kIBuS1 bAqesF8znwaOcoVda+q0LSIKaoowCbnCRRS4qdXkQpNwWnPKfwZWuGCKqOe9turF ZDK28NeWJzdZ5e79HTCw+oqaQ0GkMteTsYKy+qbuM0mcCKbxDKIvA3tl1OaNyPf3 RCaVpOr4xDaIzS/sFOzpOEqyuEtBfyQys6Q+2I7CBpXikqYnWSkgxuuVxQ8pcfQm Sn0ExDdqv+9sm107QnjdHQn97uAa3VJTDTbqQRNEENLcwA6/A+w83+a2uHeqCtxS 1AOEiarGF9dDPX9xPJa2ja0NsBZUg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrgedvgddugeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtke ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepuddufeejte evffehgfduhedthfdvteekieeuheefveevudetkeelueehgeduhefhnecuffhomhgrihhn pehpohhsthhgrhgvshhqlhdrohhrghenucfkphepjeehrddujedvrdehrddvfedunecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghn rdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 0B93E3064682; Mon, 5 Oct 2020 15:34:35 -0400 (EDT) Subject: Re: UUID generation problem To: byrnejb@harte-lyne.ca, =?UTF-8?B?UGF1bCBGw4PCtnJzdGVy?= 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> <91900e671c6f124811856337449555e1.squirrel@webmail.harte-lyne.ca> <5D2FCB5D-43F9-4FC6-87F8-6AA073B3FB1B@gmail.com> <5ddb4d5509945a2daf8b26f403810101.squirrel@webmail.harte-lyne.ca> From: Adrian Klaver Message-ID: <798cfdac-1f56-673d-4a17-a45221135f0a@aklaver.com> Date: Mon, 5 Oct 2020 12:34:35 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.147.123.19 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 10/5/20 12:03 PM, James B. Byrne wrote: > > > On Mon, October 5, 2020 13:34, Paul Förster wrote: >> >> well, actually, you can just set the search_path for the role the application >> logs in with: >> >> alter role set search_path = ', pg_catalog, public'; >> >> The next time logs in, it should see the freshly set search_path. >> >> When we create an app schema and role set in our databases, we always do this >> to make sure that the application role always finds its schema. We never had >> any problems with this. >> >> https://www.postgresql.org/docs/current/ddl-schemas.html#DDL-SCHEMAS-PATH >> https://www.postgresql.org/docs/current/sql-alterrole.html >> >> Hope this helps, >> Paul > > idempiere(5432)=# select schema_name > idempiere-# from information_schema.schemata; > schema_name > -------------------- > public > information_schema > pg_catalog > pg_toast_temp_1 > pg_temp_1 > pg_toast > adempiere > (7 rows) > > Do I infer from this that the application installer adds a schema called > adempiere; regardless of what username I choose for the database owner? Or did > I cause this selection of schema name through some explicit action of my own? I'm guessing the installer did this as namespace(schema) to place the application specific objects. You would have to look at the installer code or ask the application authors. > > I also infer that this can be corrected in the manner suggested by issuing: > > alter role idempiere-dbadmin set search_path = 'adempiere, pg_catalog, public'; > > Is this correct? Yes, but leave out pg_catalog. It is an implicit schema and does not need to be mentioned and as Tom mentioned it could pose a security risk. > > As to below hard to say without recreating all the steps you took. Again, is this setup something that is 'live' or can you start over with a cleaner install? > When I created the user adempiere I used this: > > su - postgres -c 'createuser -S -d -r -l -P adempiere' > > Now, man createuser says this: > . . . > -S > --no-superuser > The new user will not be a superuser. This is the default. > . . . > > But, psql says this (somewhat compressed): > > idempiere(5432)=# \du > > List of roles > Role name | Attributes | Member of > adempiere | Superuser | {} > . . . > > So, as I specified -S (--no-superuser when creating this user how comes it that > the adempiere username does, in fact, have the Superuser privilege? This is > not something that I am conscious of having granted. For that matter, I first > would have to research the exact command syntax to carry it out. > > Something in the installer must be doing something to the adempiere role, but I > cannot find where. > -- Adrian Klaver adrian.klaver@aklaver.com