Postgresql – How do a I edit .conf file for a postgres AWS RDS

amazon-rdsamazon-web-servicespostgresql

I would like to alter pg_hba.conf in my postgres RDS instance so that I can use cert authentication. I have found the Parameters Group manager in the RDS which allows me to alter parameters but it just references a path for pg_hba.conf. It doesn't seem to allow me to alter pg_hba.conf.

Best Answer

As of now, RDS does allow changing configurations. So you can

  1. See the list of configurations that your RDS is using.
  2. You can change these parameters. I believe you can not change all the parameters though. You can change those that are listed in the RDS reference page.

As usual there are some static (or fixed) configuration parameters for which you have to restart you DB server and then there are dynamic options for which you dont need a restart.

Here is what the RDS reference manual says:

PostgreSQL parameters that you would set for a local PostgreSQL instance in the postgresql.conf file are maintained in the DB parameter group for your DB instance. If you create a DB instance using the default parameter group, the parameter settings are in the parameter group called default.postgres9.3.

When you create a DB instance, the parameters in the associated DB parameter group are loaded. You can modify parameter values by changing values in the parameter group. You can also change parameter values, if you have the security privileges to do so, by using the ALTER DATABASE, ALTER ROLE, and the SET commands. Note that you cannot use the command line postgres command nor the env PGOPTIONS command because you will have no access to the host.

Here is the official amazon RDS documentation for postgres: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.Parameters