> On 22 Jan 2024, at 17:47, c@osss.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/
shouldbe 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
--versionor --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