Skip to main content

Deploy PostgreSQL

PostgreSQL is a powerful, open source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.

Deploy PostgreSQL

Considerations

  • Size: The size of the instance that you want to deploy. You can see the available sizes here. The size of the instance will affect the performance of your queries. You will want to choose the size that fits your needs.

  • Region: The region where you want to deploy your instance. You can see the available regions here. This is important because the region will affect the latency of your queries. You will want to deploy your instance in the region that is closer to your users and yours data sources.

Deploy PostgreSQL

Deploying a new PostgreSQL instance is very easy. You just need to run the following command:

exy deploy \
--cloud aws \
--database postgres \
--org_id your-org_id \
--token your-awesome-token \
--plan professional \
--region us-east-1

The response will be a JSON object with the following properties:

{
  "cloud": "aws",
  "resource_id": "5c9f5b5c",
  "database": "postgres",
  "org_id": "your-org_id",
  "plan": "professional",
  "region": "us-east-1",
  "created_at": "2019-03-27T12:34:56.789Z",
}

You will receive an email with the information that you need to start to use the service.

The resource_id is the identifier of your PostgreSQL instance. You will need it to manage your instance.

Access your PostgreSQL instance

You can access your PostgreSQL instance using PostgreSQL Command-Line Tool. You can install it using the following command (Linux):

sudo apt-get install postgresql-client

Once you have installed the PostgreSQL Command-Line Tool, you can connect to your PostgresSQL instance using the following command:

psql -h 5c9f5b5c.customers.exy.io -p 5432 -U <your-instance-user>

You will be prompted to enter your password. Once you have entered your password, you will be connected to your PostgreSQL instance.

Manage your PostgreSQL instance

You can manage your PostgreSQL instance using the [PostgreSQL Command-Line Tool] (https://www.postgresql.org/docs/16.0/app-psql.html). You can install it using the following command (Linux):


### Change the password of your PostgreSQL instance

Is highly recommended that you change the password of your PostgreSQL instance. You can do it using the following command:

```shell
PostgreSQL -h 5c9f5b5c.customers.exy.io -P 3306 -u <your-instance-user> -p
ALTER USER <your-instance-user> WITH PASSWORD '<your-new-password>';

Ready to roll?

Now that you have your PostgreSQL instance up and running, you can start to use it. You can find more information about how to use PostgreSQL in the PostgreSQL documentation.

If you have any questions, please contact us at support@exy.com or sign up to the Time Series Community Slack.