pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Perry Smith <pedz@easesoftware.com>
To: pgsql-general list <pgsql-general@lists.postgresql.org>
Subject: WARNING:  could not open statistics file "pg_stat_tmp/global.stat": Operation not permitted
Date: Thu, 8 Sep 2022 22:05:36 -0500
Message-ID: <B153E938-C2BB-460E-AEEC-F5DAC8C1501A@easesoftware.com> (raw)

This is an issue when PostgreSQL is running inside a container.  In my quest to find an answer, I’ve discovered three instances that it has come up and various people have talked about fixes but no one seemed to notice what I found.

I opened an issue here[1].

From within the container, files which I assume are created by PostgreSQL are ending up being owned by root rather than Postgres.  Thus, to me, it appears to NOT be an issue of mapping internal UIDs and GIDs to external IDs since there should not be anything outside the PostgreSQL container creating files inside Postgres’ data directory.

The reason I’m sending this note to the general list is to ask how bad is this error?  Some “solutions” are to make the pg_stat_tmp directory internal to the image and that somehow resolves the issue but I don’t think anyone really understands why and things like that bother me.  But I’m also curious if that appears to be a viable solution.  The result 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?  Does Postgres store anything that that needs to survive a restart?

Thank you for your help,
Perry
[1] https://github.com/docker-library/docs/issues/2188#issue-1367170047 <https://github.com/docker-library/docs/issues/2188#issue-1367170047;

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (3+ messages)  latest in thread

Message-ID: <B153E938-C2BB-460E-AEEC-F5DAC8C1501A@easesoftware.com>
Permalink:  ../B153E938-C2BB-460E-AEEC-F5DAC8C1501A@easesoftware.com/
Also on:    postgresql.org/message-id/B153E938-C2BB-460E-AEEC-F5DAC8C1501A@easesoftware.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: pedz@easesoftware.com
  Subject: Re: WARNING:  could not open statistics file "pg_stat_tmp/global.stat": Operation not permitted
  In-Reply-To: <B153E938-C2BB-460E-AEEC-F5DAC8C1501A@easesoftware.com>
  References: <B153E938-C2BB-460E-AEEC-F5DAC8C1501A@easesoftware.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox