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 1oWVJn-0002x2-Dk for pgsql-general@arkaria.postgresql.org; Fri, 09 Sep 2022 04:08:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oWVJm-00051E-94 for pgsql-general@arkaria.postgresql.org; Fri, 09 Sep 2022 04:08:38 +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 1oWVJl-000515-Uf for pgsql-general@lists.postgresql.org; Fri, 09 Sep 2022 04:08:37 +0000 Received: from black.elm.relay.mailchannels.net ([23.83.212.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oWVJe-00055e-U0 for pgsql-general@lists.postgresql.org; Fri, 09 Sep 2022 04:08:36 +0000 X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id D7BA04C2662; Fri, 9 Sep 2022 04:08:28 +0000 (UTC) Received: from mi3-ss4.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id 0F44E4C25BD; Fri, 9 Sep 2022 04:08:27 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1662696508; a=rsa-sha256; cv=none; b=vh/FvVnNFz3iUony5SgOQoVDth2LoR414FheMBbYycN8Wr/pbbcz4Io0YIMTjLcLfvoMqr HhxMR/880TnlKXSXNyWLtKPFWKPEeOuy9YeJN6VS/I6RzU9AFGR+rE3Ca3fUCpFjGQyEi1 8C3okR2j1UsrY5eZErm56C6/cNWMBo6y2kv9XnXf2LG8rpCGk6hi+BN2Y5JaUqpskKayUv iNpAKCaxT7lqB+tNx6Uvu57qmJ33dcyhMNoyDeM4YSvf6r2LfXM69nggi8Gsd4ZpJxn/E3 kRZNrROnqOsu7xYzHz2LQ3O3KC9IFHCnt+CNPRtnW1TMUjl68iApA4JMs6MSrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1662696508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Phel6UZqop6r1w44b8Dtkp+vtHYKPaycc3RPiIAxUcA=; b=Nj/mQl64SO2CofxJFoJ85IiaN2oUeCrV+2dXNeAi2hbXHsUGIAQKsvZ/uTv00rD7vNl27M 00Z7xUB3vxVVhAq+dPOFUr2EkOpS1dP+EsyaUpx0XquE9zyYSSYWq6wixwvffc3DJD51+V 2d1Pb39WEgMBwQ4Dj185eG69g4qoog0RwMD2CS4kbOJgoFfx7viyGvaXwZHqSa93dsVJys FHSChxMFSvpBRyZRsLj4cxtmlzw4vUZlQtryDHGQ+QF2UrRZOUyShRnoPUYH/FzIl4BRP2 wjR9hh5ptNbvFQTiSuRiZMqdegejzCQfI4mk34KdW2VhTz+8U/uMioWx9dOrmA== ARC-Authentication-Results: i=1; rspamd-686945db84-4224x; auth=pass smtp.auth=a2hosting smtp.mailfrom=pedz@easesoftware.com X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MailChannels-Auth-Id: a2hosting X-Irritate-Macabre: 6f8095046a28400e_1662696508494_2364467462 X-MC-Loop-Signature: 1662696508494:15322237 X-MC-Ingress-Time: 1662696508494 Received: from mi3-ss4.a2hosting.com (mi3-ss4.a2hosting.com [68.66.200.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.108.161.89 (trex/6.7.1); Fri, 09 Sep 2022 04:08:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=easesoftware.com; s=default; h=To:In-Reply-To:Cc:References:Message-Id:Date :Subject:Mime-Version:From:Content-Transfer-Encoding:Content-Type:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Phel6UZqop6r1w44b8Dtkp+vtHYKPaycc3RPiIAxUcA=; b=PKtn/vwv82F8ZAYCLluv1reA2z +MdGZtoI02t1qQP0dXASALmxuwQ5moZf4seTpwcx6dTZX01eKaH1IqvtAK+ui6Vk8Uk2ukOdAq3Z+ 9vw7MdzKU+YjAUTRbVShtFRzMUsxAM1MgPfCKYhiX3jG3o8xmU2uAg4dDND0THLjqlEugAnJRdK9K Z13jB8gCCTcriNhDjCM5Bi9z1IUdbumidxF3nUfT21SbDSjvJ41KBMjzv//qbwT2llzOIlluZRRSv CsWo+8IXkKXycKNbVYH/cLMVz9B/Unq21igb3UI/JKPKG6a+k3O3R/fsT0XtfK9+XDlaJx0kokyn2 sYqqSxYw==; Received: from cpe-70-94-128-193.satx.res.rr.com ([70.94.128.193]:56180 helo=smtpclient.apple) by mi3-ss4.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oWVJa-0001ly-Ff; Fri, 09 Sep 2022 00:08:26 -0400 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Perry Smith Mime-Version: 1.0 (1.0) Subject: Re: ***SPAM*** Re: WARNING: could not open statistics file "pg_stat_tmp/global.stat": Operation not permitted Date: Thu, 8 Sep 2022 23:08:25 -0500 Message-Id: References: <12702.1662694970@sss.pgh.pa.us> Cc: pgsql-general list In-Reply-To: <12702.1662694970@sss.pgh.pa.us> To: Tom Lane X-Mailer: iPad Mail (19G82) X-AuthUser: pedz+easesoftware.com@mi3-ss4.a2hosting.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Sep 8, 2022, at 10:43 PM, Tom Lane wrote: >=20 > =EF=BB=BFPerry Smith writes: >> =46rom within the container, files which I assume are created by >> PostgreSQL are ending up being owned by root rather than Postgres. >=20 > If it looks that way from *inside* the container, that's not good > --- wouldn't that prevent Postgres from reading the files? >=20 >> The reason I=E2=80=99m sending this note to the general list is to ask ho= w bad >> is this error? Some =E2=80=9Csolutions=E2=80=9D are to make the pg_stat_= tmp directory >> internal to the image and that somehow resolves the issue but I don=E2=80= =99t >> think anyone really understands why and things like that bother me. But >> I=E2=80=99m also curious if that appears to be a viable solution. The re= sult >> will be that when the Postgres is stopped and the container exited, the >> next time Postgres starts back up, the pg_stat_tmp directory will be >> gone. Is that ok? >=20 > pg_stat_tmp exists specifically because it holds only temporary files, > cf >=20 > https://www.postgresql.org/docs/devel/storage-file-layout.html >=20 > It's explicitly cleared out during server start. >=20 > The only reason to put it outside the data directory is to make it > *less* persistent than the rest of PG's files, say by putting it > on a RAM disk. You sound like you've set it up to be *more* > persistent (ie outside the container not inside), which surely is > exactly backwards. The data directory is outside so it is persistent. The pg_stat_tmp is insid= e the data directory. This is how whoever builds the =E2=80=9Cofficial=E2=80= =9D Postgres images set things up. If the right solution is to not make it part of the data directory, I can ch= ange that. One of the solutions explains how which solves the Postgres issu= e but still leaves open the question of how and why do some of the files get= owned by root (which probably is a Docker or a Linux issue).