Getting started with Aiven for PostgreSQL®¶
Aiven for PostgreSQL® is available in the Aiven console.
Choose the PostgreSQL® version, your cloud provider and location to deploy to, then choose which plan to use.
If you’re just trying out PostgreSQL, a single-node setup is available with our startup and hobbyist plans. This isn’t recommended for production use however; for that you should try the high availability pairs provided on the business plans, or a premium plan to meet your needs.
Finally, give the service a name and then select “Create Service”, and your shiny new PostgreSQL database will start building. While it does that, you can already visit the service overview page to see the details of the service.
Connect to PostgreSQL with
The direct PostgreSQL connection endpoint can be found under the Service URI connection information on the main service overview tab. To understand more about direct connections and connection pooling visit the dedicated page
With psql you can connect to the PostgreSQL instance with the following command, by replacing the
Load a test dataset in PostgreSQL¶
If you’re checking out PostgreSQL, loading a test dataset will give you something to look at. This example uses
dellstore2, a standard store dataset with products, orders, inventory and customer information.
dellstore2-normal-1.0.tar.gzfile from the PostgreSQL website and unzip it.
Navigate to the
dellstore2-normal-1.0folder on your terminal.
Connect to your PostgreSQL instance with
psqlas shown above.
dellstoredatabase and connect to it with the following command from
CREATE DATABASE dellstore; \c dellstore
psql terminal prefix will change to
dellstore==> when you are connected to the correct database.
Populate the database by executing the following command from
Verify which objects have been created from
The output should look like this:
List of relations Schema | Name | Type | Owner --------+--------------------------+----------+---------- public | categories | table | avnadmin public | categories_category_seq | sequence | avnadmin public | cust_hist | table | avnadmin public | customers | table | avnadmin public | customers_customerid_seq | sequence | avnadmin public | inventory | table | avnadmin public | orderlines | table | avnadmin public | orders | table | avnadmin public | orders_orderid_seq | sequence | avnadmin public | products | table | avnadmin public | products_prod_id_seq | sequence | avnadmin public | reorder | table | avnadmin (12 rows)
Here are some more resources to help you on your PostgreSQL journey: