mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 16:46:28 +00:00
standby clone: fix data directory permissions handling for Pg11 and later
Previously, repmgr would forcibly change the permissions on a data directory to 0700. However from PostgreSQL 11, 0750 is also valid, so that value should not be changed.
This commit is contained in:
@@ -838,6 +838,16 @@ do_standby_clone(void)
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Do a final check on the data directory permissions - if the user
|
||||
* is cloning into an existing directory set to 0750, and the server
|
||||
* is Pg10 or earlier, Pg will refuse to start. We might not have
|
||||
* known the server version when creating the data directory
|
||||
* (mainly if cloning from Barman with no upstream connection), hence
|
||||
* the additional check here.
|
||||
*/
|
||||
set_dir_permissions(local_data_directory, source_server_version_num);
|
||||
|
||||
/*
|
||||
* TODO: It might be nice to provide an option to have repmgr start the
|
||||
* PostgreSQL server automatically
|
||||
|
||||
Reference in New Issue
Block a user