To change the master encryption key, run the pgx_declare_external_master_key function as you originally set it. Refer to "6.2 Setting the Master Encryption Key" for more information.
Also, by specifying a different key management system name than the key management system name specified during installation, you can change the key management system to be used. Refer to"6.6.5 Changes to the Key Management System" for details.