Skip to main content

Installation and Quick Start


Support or reporting problem that you are having can be done via the Brytlyt support portal.

Amazon Web Services (AWS)

Launching a Brytlyt instance is quick and easy on AWS. You can search for the Brytlyt AMI in the AWS Marketplace or launch from the product home page. BrytlytDB is a PostgreSQL fork, so all the tools and utilities that work for PostgreSQL will work.

Once the instance has launched you can connect to is via SSH directly from linux. Make sure you connect as the ubuntu user.

ssh -i "MyKey.pem" ubuntu@

You can also connect to the AWS instance using putty. Make sure to connect as the ubuntu user.

Using Spot Instances (AWS)

AWS spot instance price varies over time but often the spot instance is 90% cheaper than on-demand instances. There is a risk that your spot instance is terminated before you’ve finished using it. Great for trying things out, not so good for production environments.

Launching a Marketplace AMI on spot is slightly more involved because the AMI is not searchable from the standard Spot Requests launch console, so you need to find it first. To do this, go to the AWS Marketplace product home page. For Brytlyt that home can be found here.

Next click on the “Continue” button on the top right. Then click on the “Manual Launch” tab, middle of the three options on the top left. Half down, in the Launch section, you will see a list with an AMI ID for each region. Copy the AMI ID for the region you would like to launch the spot instance in.

Now you have all you need to launch the instance using spot. Go to the EC2 console, select “Spot Requests” and click on the “Search for AMI” button. Past the AMI ID into the “Search by AMI ID or keyword” text box and hit enter. You should now see the AMI and click the blue “Select” button.
Remember to change the instance type to one of the p2 instances and increase the amount of disk storage if necessary by upping the size of each of the six disks that make up the RAID 0 storage array.

Connecting to the Cluster

Once connected to the instance use the standard PostgreSQL psql client to connect to BrytlytDB by typing psql on the command line.

You are connected to the cluster. View the nodes of the cluster by querying the contents of the catalogue.

ubuntu=# select node_name, node_port, node_host from pgxc_node;
node_name | node_port | node_host
c0       |      5432            | localhost
d0       |     15432          |
(2 rows)

All the standard psql switches are available, including \timing to provide query runtime times and \q will disconnect and quit the psql client.

ubuntu=# \timing
Timing is on.
ubuntu=# \q >

BrytlytDB services can be viewed using the ps command.

 >ps aux    |      grep data
brytlyt            1854 /usr/local/brytlyt/bin/gtm -D /usr/local/data/g0
brytlyt            1855 /usr/local/brytlyt/bin/postgres --coordinator -D /usr/local/data/c0
brytlyt            1856 /usr/local/brytlyt/bin/postgres --datanode -D /usr/local/data/d0
ubuntu             grep --color=auto data

On instance launch, six storage disks are configured as a RAID 0 array and mounted at /usr/local/data. This is the best place to stage data for loading to the cluster. Note: the brytlyt user is the owner of this folder.

Create a table using line item from the TPC-H benchmark.

( l_orderkey      INT,
  l_partkey       INT,
  l_suppkey       INT,
  l_linenumber    INT,
  l_quantity      REAL,
  l_extendedprice REAL,
  l_discount      REAL,
  l_tax           REAL,
  l_returnflag    VARCHAR(1),
  l_linestatus    VARCHAR(1),
  l_shipdate      TIMESTAMP,
  l_commitdate    TIMESTAMP,
  l_receiptdate   TIMESTAMP,
  L_shipinstruct  VARCHAR(25),
  l_shipmode      VARCHAR(10),
  l_comment       VARCHAR(44)
) SERVER gm_fdw_server OPTIONS (max_size '6001215')

Import data using the COPY command

COPY lineitem FROM '/usr/local/data/lineitem.tbl' WITH (DELIMITER '|');

Run some simple queries

SELECT COUNT(*) FROM lineitem;
l_returnflag                                         ,
l_linestatus                                         ,
SUM(l_quantity)                                      sum_qty,
SUM(l_extendedprice)                                 sum_base_price,
SUM (l_extendedprice*(1-l_discount))                 sum_disc_price,
SUM (l_extendedprice*(1-l_discount)*(1+l_tax))       sum_charge,
AVG(l_quantity) avg_qty, AVG (l_extendedprice)       avg_price,
AVG (l_discount)                                     avg_disc,
COUNT(*)                                             count_order