Why use synchronous_standby_names = 'barman_receive_wal' will cause database aberrant? Use barman's synchronous_standby_names feature in PostgreSQL's postgresql.conf file
synchronous_standby_names = 'barman_receive_wal'

Can't do these operations:

createuser(hanging)
createdb(hanging)
can't save data in primary database if use repmgr for replication

Main configuration for them is
max_wal_senders = 10
max_replication_slots = 10
shared_preload_libraries = 'repmgr'
wal_level = 'replica'
archive_mode = on
archive_command = 'rsync -a %p barman@backup_server:/var/lib/barman/mydb/incoming/%f'
synchronous_standby_names = 'barman_receive_wal'

If remove synchronous_standby_names from this configuration, it works well.
I see you've set up PostgreSQL to push WAL files to barman via archive_command - is barman also set up for WAL streaming? If that's not the case, there will be no synchronous standby with the name barman_receive_wal and hence any writes to the primary will not succeed, as PostgreSQL is waiting for a standby commit confirmation which never arrives.