AWS RDS PostgreSQL – Managing Multiple Databases in the Same Instance

amazon-rdsawspostgresql

I have an existing database in a RDS AWS PostgreSQL instance. I need to create one more database in this instance as spinning up a separate cluster will be expensive. There doesn't seem to be any option to create one more database inside this instance. I understand that I can create a separate schema for this purpose(like in MySQL) but I need to keep the resources for these separate and hence the need for a separate database.

Please let me know if it is possible.
PostgreSQL 9.6.5

Best Answer

I believe you can. Based on AWS RDS FAQs:

Q: How many databases or schemas can I run within a DB instance?

  • RDS for Amazon Aurora: No limit imposed by software
  • RDS for MySQL: No limit imposed by software
  • RDS for MariaDB: No limit imposed by software
  • RDS for Oracle: 1 database per instance; no limit on number of schemas per database imposed by software
  • RDS for SQL Server: 100 databases per instance
  • RDS for PostgreSQL: No limit imposed by software

You can create additional database by connecting to you DB instance and do a CREATE DATABASE. Check this guide

To create additional databases, connect to the DB instance and use the SQL command CREATE DATABASE.

And the blog post on how to create new database in an existing PostgreSQL DB Instance:

psql --host=SOME-DBMS-HOST --dbname EXISTING_DB \
     --username=YOUR-USERNAME --password \
     --command="CREATE DATABASE new_database WITH OWNER some_owner"