Gigalixir’s Standard Tier databases are production level databases. Standard tier databases can grow with your application. Additionally we offer read replicas and high availability.
Creating a Standard Tier Database
To create a standard tier database, run:
gigalixir pg:create --size=$SIZE
Standard tier databases sizes can be 0.6, 1.7, 4, 8, 16, 32, 48, 64, or 96. See Database Pricing for details.
Give it a moment, it takes a few minutes ⏲️ to provision. See Scaling Times for details.
You can check the status by running:
gigalixir pg
The create command will create the DATABASE_URL environment variable if it does not already exist.
Additionally if the POOL_SIZE environment variable is not set, this will set it to 9.
For more information on properly setting the pool size, see Pool Size Determination.
You can only have one standard tier database per application.
Backups are automatically configured and happen daily. We keep 7 days worth of backups, which can be restored. See Backup and Recovery for more details.
Standard tier databases are created as single instances. High availability can be enabled, see High Availability.
By default, we will create a Postgres 17 database. You can specify any version from Postgres 13 to Postgres 18.
gigalixir pg:create --size=$SIZE --version=POSTGRES_13
See Supported Versions for details.
Connecting to your Database
Your app connects through the DATABASE_URL environment variable.
See Database Configuration for the Ecto
settings, including the SSL options, and Pool Size Determination
for choosing your POOL_SIZE.
To connect from your own machine, see Connecting with psql.
All of this is on the Connectivity page.
Listing your Databases
List databases by running:
gigalixir pg
Scaling Your Database
To change the size of your database, run:
gigalixir pg:scale -d $DATABASE_ID --size=$SIZE
Standard tier databases sizes can be 0.6, 1.7, 4, 8, 16, 32, 48, 64, or 96. See Database Pricing for details.
You can find your database ID by running:
gigalixir pg
Scaling will cause a downtime while the database restarts. See Scaling Times for details.
High Availability
Databases are created as single instances. High availability can be enabled with the pg:scale command:
gigalixir pg:scale -d $DATABASE_ID --high_availability=enabled
Scaling will cause a downtime while the database restarts. See Scaling Times for details.
Equally, high availability can be disabled with:
gigalixir pg:scale -d $DATABASE_ID --high_availability=disabled
See High Availability Pricing for cost.
Read Replicas
Read replicas are a great way to improve the performance of your database. Standard databases can have an unlimited number of read replicas.
See Read Replicas for details.
Backup and Recovery
All standard tier databases are automatically backed up daily. We store 7 days worth of backups you can restore to.
See Backup and Recovery for details.
Security
Encryption at Rest
All standard tier databases and their backups are encrypted at rest using AES-256 encryption. This is handled automatically by the underlying Google Cloud SQL infrastructure. No additional configuration is required.
SSL and Private Network Access
Standard tier databases support SSL connections, and can be reached over a private network through the Cloud SQL Auth Proxy. See SSL Connections and Private Network Access.
Password Rotation
To rotate your database password:
- Connect to your database via
gigalixir pg:psql. - Change the password with SQL:
ALTER USER gigalixir_admin WITH PASSWORD 'new_secure_password'; - Update the
DATABASE_URLconfig on your app:gigalixir config:set DATABASE_URL="ecto://gigalixir_admin:new_secure_password@HOST:PORT/DB"
Users and Roles
On the standard tier, your credentials give you administrative privileges to your database. You can create users and roles, grant permissions, create views, etc.
Install a Postgres Extension
First, make sure Google Cloud SQL supports your extension by checking their list of extensions.
Get a psql console into your database:
gigalixir pg:psql
Then, install your extension:
CREATE EXTENSION foo;
Versions and Upgrading
New standard tier databases are created with Postgres 17 by default, and you can choose any version from Postgres 13 to Postgres 18. Minor versions are upgraded automatically during your database’s maintenance window.
To upgrade the major version of your database, run:
gigalixir pg:upgrade -d $DATABASE_ID VERSION
See Versions and Upgrading for the supported versions, extended support pricing, what to check before an upgrade, and typical upgrade times.
Stopping a Standard Database
To stop your database, run:
gigalixir pg:stop -d $DATABASE_ID
Starting a Standard Database
To start a stopped database, run:
gigalixir pg:start -d $DATABASE_ID
Restarting a Standard Database
To restart your standard tier database, run:
gigalixir pg:restart -d $DATABASE_ID
Destroying a Standard Database
Delete your database by running:
gigalixir pg:destroy -d $DATABASE_ID
Database Pricing
| Size | Standard Support |
Extended Support |
RAM | Rollback Days | Connection Limit | Storage Limit |
|---|---|---|---|---|---|---|
| 0.6 | $25/mo | $50/mo | 0.6 GB | 7 | 25 | 25 GB |
| 1.7 | $50/mo | $100/mo | 1.7 GB | 7 | 50 | 50 GB |
| 4 | $100/mo | $200/mo | 4 GB | 7 | 100 | 100 GB |
| 8 | $200/mo | $400/mo | 8 GB | 7 | 200 | 200 GB |
| 16 | $400/mo | $800/mo | 16 GB | 7 | 250 | 400 GB |
| 32 | $800/mo | $1600/mo | 32 GB | 7 | 300 | 800 GB |
| 48 | $1200/mo | $2400/mo | 48 GB | 7 | 350 | 1.2 TB |
| 64 | $1600/mo | $3200/mo | 64 GB | 7 | 400 | 1.6 TB |
| 96 | $2400/mo | $4800/mo | 96 GB | 7 | 500 | 2.4 TB |
Prices are prorated to the second.
Sizes 0.6 and 1.7 share CPU with other databases.
All other sizes have dedicated CPU, 1 CPU for every 4 GB of memory.
For example, size 4 has 1 dedicated CPU and size 64 has 16 dedicated CPUs. All databases start with 10 GB disk and increase automatically, as needed.
Contact Us if you are interested in additional sizes.
High Availability Pricing
Adding high availabilty doubles the cost of the database. Prices are prorated to the second. See Database Pricing for the undoubled prices per size.
Scaling Times
Scaling a standard tier database requires a restart of the database. Below is a list of the typical operation times for database sizes.
| Size | Typical Scaling Time |
|---|---|
| 0.6 | 10 - 25 minutes |
| 1.7 | 10 - 25 minutes |
| 4+ | 4 - 8 minutes |