To ensure that the secret keys are never visible in database logs, write a wrapper function to get the keys from the file. You need to do it in an untrusted embedded language, such as PL/PythonU, as only untrusted languages can access the filesystem. You need to be a PostgreSQL superuser in order to create functions in untrusted languages. It's not difficult to write a PostgreSQL function that reads a text file. For convenience, here is an example that requires PL/PythonU:
create or replace function get_my_public_key() returns text as $$ return open('/home/pguser/public.key').read() $$ language plpythonu; revoke all on function get_my_public_key() from public; create or replace function get_my_secret_key() returns text as $$ ...