On 9/25/19 8:55 AM, Sonam Sharma wrote: > My user has permission to touch inside the Fs. > I am not getting why it is checking for /backup. > > Any suggestions on this , what else I can check
You see that pg_auto_failover is trying to `mkdir -p $pgdata/../backup` (where pgdata is a C variable, not a shell/environment variable). You might want to read through the rest of that code to see where pgdata is coming from, and see if it's being set correctly. Do you really want /backup at the root level?
Clearly whatever user is running pg_basebackup doesn't have permission to make that directory. But maybe that's okay and the directory should be somewhere else.