Quick start for the BigAnimal free trial
This topic provides a quick walk-through of the steps needed to configure a PostgreSQL 14 cluster on BigAnimal running against AWS with a free trial account.
Step 1: Create an account and sign into the portal
If you haven't done so already, you'll need to create your EDB account.
Then, use your newly created account to access the BigAnimal free trial portal.
Note
Continue to use the portal at freetrial.biganimal.com to access BigAnimal for the duration of your free trial.
Step 2: Create an AWS cluster
Select the Clusters link on the left to navigate to the Clusters page.
Select the Create New Cluster button.
You should now find yourself at the Create Cluster page.
Select Single Node as your cluster type.
Select AWS for Provider.
Select Next: Cluster Settings.
Enter
AWS PostgreSQL cluster
in the Cluster Name field.Enter a strong, memorable password in the Password field.
This is the admin password for the cluster.
Select PostgreSQL for Database Type
This gives you an official build of PostgreSQL.
Select 14 for Postgres Version.
Select US East 1 for Region.
For Instance Type and Storage, only one set of options is available in the trial. Select each option.
Select Create Cluster. You'll be brought back to the Clusters page with your newly configured cluster now populating the list. It usually takes a minute or two for your cluster to be ready but can take up to an hour. A progress bar is shown near the right.
Managing your cluster
After you select Create Cluster, you'll be brought back to the Clusters page with your newly configured cluster now populating the list. In the free trial, you can provision only one cluster at a time. That said, you can delete your cluster, start a new cluster, and even restore a deleted cluster. BigAnimal automatically backs up clusters.
Once your first cluster is fully provisioned, your 14-day free trial officially starts, and a countdown appears telling you how many days are left in your trial.
Step 3: Connect to your new cluster
Select your cluster to get an overview of how it has been configured. Select the Connect tab to see more information about how to connect to your cluster.
Select the Overview tab and copy the Quick Connect command. Paste it into a terminal where psql is installed. It will prompt for your password and put you on a SQL command line.
$ psql -W "postgres://edb_admin@[HOST]:5432/edb_admin?sslmode=require" Password: psql (13.5 (Ubuntu 13.5-2.pgdg20.04+1), server 14.2.1 (Debian 14.2.1-1+deb10)) WARNING: psql major version 13, server major version 14. Some psql features might not work. SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off) Type "help" for help. edb_admin=>
Note
While psql is a good all-around option for working with Postgres databases, you can use the client of your choice. See Connect to a cluster for more ideas.
Things to try
Create a new database
We're going to create some sample math data, so we're going to create a database called math
. We could use the default edb_admin
database, but best practice is to isolate data.
Create a new role called
math
.create user math with password 'math_password';
Grant the
math
role toedb_admin
.grant math to edb_admin;
Create a new
math
database.create database math with owner math;
Connect to the
math
database. You're prompted for theedb_admin
password you provided in Step 2 above.\connect math
Populate a table and query it
We're going to use temporary tables to calculate prime numbers using a Sieve of Eratosthenes.
Create a table for storing prime numbers called
primes
.CREATE TABLE primes ( num INTEGER, PRIMARY KEY (num) );
Populate the table with all prime numbers up to 1000. (This code is based on code from David Fetter.)
-- Based on https://wiki.postgresql.org/wiki/Sieve_of_Eratosthenes WITH RECURSIVE t0(m) AS ( VALUES(1000) ), t1(n) AS ( VALUES(2) UNION ALL SELECT n+1 FROM t1 WHERE n < (SELECT m FROM t0) ), t2 (n, i) AS ( SELECT 2*n, 2 FROM t1 WHERE 2*n <= (SELECT m FROM t0) UNION ALL ( WITH t3(k) AS ( SELECT max(i) OVER () + 1 FROM t2 ), t4(k) AS ( SELECT DISTINCT k FROM t3 ) SELECT k*n, k FROM t1 CROSS JOIN t4 WHERE k*k <= (SELECT m FROM t0) ) ) INSERT INTO primes ( SELECT n FROM t1 EXCEPT SELECT n FROM t2 ORDER BY 1 );
Select the largest prime number less than 1000.
SELECT max(num) FROM primes WHERE num < 1000;
Further reading
Now that you've got the basics out of the way, see what else BigAnimal offers: