Re: Misleading/inaccurate error message from pg_basebackup

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: c(at)osss(dot)net
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Misleading/inaccurate error message from pg_basebackup
Date: 2024-01-23 10:27:10
Message-ID: A82133F3-968A-427A-953A-3A5B37ABAA65@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> On 22 Jan 2024, at 17:47, c(at)osss(dot)net wrote:

> pg_basebackup can throw an error which is inaccurate and misleading:

> $ pg_basebackup --version
> Error: /var/lib/postgresql/14/main is not accessible; please fix the directory permissions (/var/lib/postgresql/14/ should be world readable)
>
> In fact it does not need to be world readable at all - the subdirectory just needs to be created:

> This check is being done in cases where it's unnecessary, as it shouldn't matter at all when running a simple --version or --help, anyways.

There is no such check before --version or --help, and no such check at all in
pg_basebackup. Whatever is raising that error probably isn't postgres or
pg_basebackup. When pg_basebackup logs an error it looks like this:

pg_basebackup: error: /var/lib/postgresql/14/main is not accessible

Something else is doing this on your system.

--
Daniel Gustafsson

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Richard Guo 2024-01-23 10:41:41 Re: BUG #18305: Unexpected error: "WindowFunc not found in subplan target lists" triggered by subqueries
Previous Message Alexander Kukushkin 2024-01-23 08:23:29 Re: pg_rewind WAL segments deletion pitfall