Skip to content

Ask AI

Powered by Blaze

Answers come from E2E Cloud documentation. AI can make mistakes.

Create a database

View as Markdown

Create a PostgreSQL database in your TIR project. A new database has one node, the primary, and shows Running when it is ready to accept connections. DBaaS is offered in Chennai, so you create the database in a Chennai project.

In your project, open Databases > DBaaS and select Create Database.

  1. In Database Name, keep the name TIR suggests, database- followed by the date and time, or enter your own. A name is 3 to 50 characters of lowercase letters, numbers, and hyphens. It starts with a letter, ends with a letter or number, and must be unique in the project. The name stays the same for the life of the database.
  2. In Username, keep admin or enter another name for the first login. A username starts with a lowercase letter, then uses lowercase letters, numbers, or underscores, up to 63 characters. The platform keeps a few names for itself, such as postgres, so choose another. Like the name, the username is set for the life of the database.
  3. In Password, enter a password of 12 to 64 characters with at least one uppercase letter, one lowercase letter, one number, and one symbol. For a random 20-character password that meets the rule, select Suggest.
  4. Copy the password and keep it somewhere safe. The connection details show <password> in its place, so you need your own copy to connect. If you lose it, you can set a new one; see Reset a user’s password.
  1. Under Database Engine, PostgreSQL is the only engine offered. In Version, keep the suggested version or pick another that E2E offers for new databases. The version stays fixed after you create the database.
  2. Under Compute Plan, choose a plan by its vCPU, memory, and price per hour. The database gets the vCPU and memory of the plan. The plan stays fixed too, so choose one that fits the load you expect.

Under Storage, set Disk to the size the database needs. It starts at 100 GB and can be 20 GB to 1,000 GB. Drag the slider in 10 GB steps, or type any whole number of GB.

The disk holds the operating system as well as your data, so less than the full size is free for data. You can increase the disk later; the size you set here is the smallest it will ever be. The disk has a price per month of its own.

Under Network & Security:

  1. In IP Allowlist, add the addresses that can reach the database over the internet, such as your office network or your application servers. Only these addresses can reach its public endpoint, and the list needs at least one.

    • To add your own address, select Add my IP. It adds the public IPv4 address you are browsing from. If TIR cannot detect your address, type it in instead.
    • To add another address or range, type an IPv4 address or CIDR range, such as 203.0.113.0/24, and an optional description of up to 63 characters. Then select Add or press Enter. A single address is saved as a /32 range.
    • Allow from anywhere adds 0.0.0.0/0, which lets any IPv4 address reach the database. Use it only for short tests, and replace it with the ranges you need once you know them.

    The list holds up to 50 ranges, IPv4 only. Add each range you type before you launch.

  2. (Optional) In VPC, choose a VPC so that VMs and services in it can connect privately. You can choose an Active VPC with at least one free IP address. Connections from inside the VPC bypass the IP allowlist. You can also create a VPC from here, or in advance; see Create a VPC.

TIR attaches the VPC after the launch, once the database turns Running. You can change the allowlist and the VPC later; see Control network access.

Open Advanced Settings. In Extensions, keep or change the extensions to install. pg_stat_statements, for query statistics, and vector, for pgvector similarity search, are chosen for you. The others on offer are pg_trgm, uuid-ossp, pgcrypto, hstore, citext, btree_gin, btree_gist, ltree, and unaccent. They are installed in defaultdb when the database is created. pg_stat_statements is installed on every database, even if you clear it here.

You can add more extensions later. The portal can only add them, so an installed extension stays; choose only what the database needs. See Add extensions.

Parameter Group, also under Advanced Settings, is optional. To run the database with your own PostgreSQL settings, attach a group from Edit once the database is Running. See Use parameter groups.

Before you launch, check Estimated cost: the price per hour of the plan and the disk together, and about how much that is per month over 730 hours. For how this is worked out, see Billing for TIR DBaaS.

Select Launch Database. TIR checks that there is capacity for the database and, on a prepaid account, that you have enough credit. When TIR accepts the request, it opens the new database’s page. If TIR cannot launch it, it gives the reason and keeps what you entered.

While the database is Creating, its page tracks each setup step through to the last one, Ready.

The database turns Running once PostgreSQL accepts connections and the admin user exists. Its address and port are then under Public Endpoint in Connection Details.

If the setup fails, the status changes to Failed, and the page marks the step that failed. Select Retry launch to run the setup again on the same database, or Delete database to remove it. For more help, see Troubleshooting TIR DBaaS.

Next, connect to the database from your app or from psql, and schedule snapshots to keep copies of your data.

Was this page helpful?