Re: could not open file "global/pg_filenode.map": Operation not permitted - Mailing list pgsql-general

From Nick Renders
Subject Re: could not open file "global/pg_filenode.map": Operation not permitted
Date
Msg-id 2E2F11F8-718A-4E6A-81E0-4F5CC1F1273A@arcict.com
Whole thread Raw
In response to Re: could not open file "global/pg_filenode.map": Operation not permitted  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: could not open file "global/pg_filenode.map": Operation not permitted
Re: could not open file "global/pg_filenode.map": Operation not permitted
Re: could not open file "global/pg_filenode.map": Operation not permitted
List pgsql-general
Thank you for your reply Laurenz.
I don't think it is related to any third party security software. We have several other machines with a similar setup,
butthis is the only server that has this issue. 

The one thing different about this machine however, is that it runs 2 instances of Postgres:
- cluster A on port 165
- cluster B on port 164
Cluster A is actually a backup from another Postgres server that is restored on a daily basis via Barman. This means
thatwe login remotely from the Barman server over SSH, stop cluster A's service (port 165), clear the Data folder,
restorethe latest back into the Data folder, and start up the service again. 
Cluster B's Data and service (port 164) remain untouched during all this time. This is the cluster that experiences the
intermittent"operation not permitted" issue. 

Over the past 2 weeks, I have suspended our restore script and the issue did not occur.
I have just performed another restore on cluster A and now cluster B is throwing errors in the log again.

Any idea why this is happening? It does not occur with every restore, but it seems to be related anyway.

Thanks,

Nick Renders


On 26 Feb 2024, at 16:29, Laurenz Albe wrote:

> On Mon, 2024-02-26 at 15:14 +0100, Nick Renders wrote:
>> We have a Postgres server that intermittently logs the following:
>>
>> 2024-02-26 10:29:41.580 CET [63962] FATAL:  could not open file "global/pg_filenode.map": Operation not permitted
>> 2024-02-26 10:30:11.147 CET [90610] LOG:  could not open file "postmaster.pid": Operation not permitted; continuing
anyway
>>
>> This has happened 3 times over the last 2 weeks now, without any indication what caused it.
>> The privileges of those 2 files are all in order.
>> When this happens, the server is no longer accessible, and we need to restart the service (pg_ctl restart).
>> Once restarted, Popstgres runs fine again for a couple of days.
>>
>> We are running PostgreSQL 16.2 on macOS 14.3.1.
>
> Perhaps that is some kind of virus checker or something else that locks files.
>
> Yours,
> Laurenz Albe



pgsql-general by date:

Previous
From: Wiwwo Staff
Date:
Subject: Performance (and general) considerations between views and functions
Next
From: Rama Krishnan
Date:
Subject: About rsync