public inbox for [email protected]
help / color / mirror / Atom feedFrom: Alban Hertroys <[email protected]>
To: Nick Renders <[email protected]>
Cc: [email protected]
Subject: Re: could not open file "global/pg_filenode.map": Operation not permitted
Date: Fri, 22 Mar 2024 17:00:43 +0100
Message-ID: <CAF-3MvOKqiKbcG-1M=ZeW-O99PeUJ0THPm8DWrRKcTT263GtAg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On Fri, 22 Mar 2024 at 15:01, Nick Renders <[email protected]> wrote:
>
> We now have a second machine with this issue: it is an Intel Mac mini
> running macOS Sonoma (14.4) and PostgreSQL 16.2.
> This one only has a single Data directory, so there are no multiple
> instances running.
>
I don't think that having a single Data directory prevents multiple
instances from running. That's more of a matter of how often pg_ctl was
called with the start command for that particular data directory.
> I installed Postgres yesterday and restored a copy from our live database
> in the Data directory.
How did you restore that copy? Was that a file-based copy perhaps? Your
files may have incorrect owners or permissions in that case.
> The Postgres process started up without problems, but after 40 minutes it
> started throwing the same errors in the log:
>
> 2024-03-21 11:49:27.410 CET [1655] FATAL: could not open file
> "global/pg_filenode.map": Operation not permitted
> 2024-03-21 11:49:46.955 CET [1760] FATAL: could not open file
> "global/pg_filenode.map": Operation not permitted
> 2024-03-21 11:50:07.398 CET [965] LOG: could not open file
> "postmaster.pid": Operation not permitted; continuing anyway
>
It's possible that some other process put a lock on these files. Spotlight
perhaps? Or TimeMachine?
> I stopped and started the process, and it continued working again until
> around 21:20, when the issue popped up again. I wasn't doing anything on
> the machine at that time, so I have no idea what might have triggered it.
>
> Is there perhaps some feature that I can enable that logs which processes
> use these 2 files?
>
IIRC, MacOS comes shipped with the lsof command, which will tell you which
processes have a given file open. See man lsof.
--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.
view thread (15+ messages) latest in thread
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: could not open file "global/pg_filenode.map": Operation not permitted
In-Reply-To: <CAF-3MvOKqiKbcG-1M=ZeW-O99PeUJ0THPm8DWrRKcTT263GtAg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox