Does recovery write to backup_label ? - Mailing list pgsql-hackers

From Chapman Flack
Subject Does recovery write to backup_label ?
Date
Msg-id a9503f2f-6dec-e0e8-1d7b-f906c3260081@anastigmatix.net
Whole thread Raw
Responses Re: Does recovery write to backup_label ?
List pgsql-hackers
Just saw this in a PG 11.6 cluster starting a recovery:

2020-02-07 10:45:40 EST FATAL:  42501: could not open file
"backup_label": Permission denied
2020-02-07 10:45:40 EST LOCATION:  fsync_fname_ext, fd.c:3531

The label file was written with mode 0400 by a script that got
the contents from pg_stop_backup(boolean,boolean).

But during recovery, it is being poked at by fsync_fname_ext
which wants to open it O_RDWR.

I had assumed the label file would be treated as readonly
during recovery.

If the file needs to have 0600 permissions, should there be
a note in the nonexclusive-mode backup docs to say so?

Regards,
-Chap




pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: [PATCH] Erase the distinctClause if the result is unique by definition
Next
From: Pavel Stehule
Date:
Subject: Re: proposal: schema variables