Does recovery write to backup_label ?

From: Chapman Flack <chap(at)anastigmatix(dot)net>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Does recovery write to backup_label ?
Date: 2020-02-07 16:08:48
Message-ID: a9503f2f-6dec-e0e8-1d7b-f906c3260081@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2020-02-07 16:09:47 Re: proposal: schema variables
Previous Message Ashutosh Bapat 2020-02-07 15:54:27 Re: [PATCH] Erase the distinctClause if the result is unique by definition