Sorry for not giving the clarity. It is a GCP environment, we are trying to import using the GCP feature from a backup (export) taken from another instance in the same infra. While the user (hd*****) is created from the GCP console for a specific instance, I can see its presence from "select * from pg_user".
Since I am trying to restore, I believe the user should have pg_write_system_files role, hence trying to grant it.
Do we need to create hd*********' as both user and role?
Since a PG role and a PG user are the same thing under the hood, the later simply meaning the role can login, then no. Though maybe you mean a OS user since you are dealing with operating system commands here...?
Maybe show your work so we aren't left guessing what you are trying to do.