Re: pg_basebackup fails with Could not stat file or directory "./.pg_hba.conf.un~" - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: pg_basebackup fails with Could not stat file or directory "./.pg_hba.conf.un~"
Date
Msg-id CAKFQuwY495XmkvwUH_-pNp=-HdwO3yhFjGZYD7nLYWWxbmqAQw@mail.gmail.com
Whole thread Raw
In response to pg_basebackup fails with Could not stat file or directory "./.pg_hba.conf.un~"  ("Stephens, Gary" <Gary.Stephens@ehi.com>)
Responses Re: pg_basebackup fails with Could not stat file or directory "./.pg_hba.conf.un~"
List pgsql-bugs
On Tue, Mar 7, 2023 at 1:37 PM Stephens, Gary <Gary.Stephens@ehi.com> wrote:


It's unclear to me why pg_basebackup is trying to read this file.


Because that is what it is documented to do:


> The backup will include all files in the data directory and tablespaces, including the configuration files and any additional files placed in the directory by third parties, except certain temporary files managed by PostgreSQL.
 

It's also unclear why it's failing when it does try to read it, since the file has the same permissions and security context that should allow the instance to read it (even though the backup really shouldn’t need to read it).


Understandable, but not a pg_basebackup bug that it is being told it lacks permission.  But I suspect there is file locking involved and it isn't a file permission problem.

David J.

pgsql-bugs by date:

Previous
From: "Stephens, Gary"
Date:
Subject: pg_basebackup fails with Could not stat file or directory "./.pg_hba.conf.un~"
Next
From: PG Bug reporting form
Date:
Subject: BUG #17824: PQTRANS_ACTIVE misleading