Developers Guide

August 29, 2022 ยท View on GitHub

This guide contains information for developers.

Password for writing to BucketFS of your Exasol database

In case you are running Exasol in a docker container the following script helps you to get the password for writing to BucketFS of your Exasol database:

CONTAINER=<container id>
export BUCKETFS_PASSWORD=$(
  docker exec -it $CONTAINER \
  grep WritePass /exa/etc/EXAConf \
  | sed -e 's/.* = //' \
  | tr -d '\r' \
  | base64 -d)

Remote Logging

When creating a Virtual Schema you can enable remote access to information logged by the virtual schema adapter see Remote logging.

Please note that remote logging

  • imposes security risks on your system
  • may affect the performance of your system
  • should be used only for debugging and development purposes but not in productive scenarios

Finding Out the Port of a PostgreSQL Database Installation

PostgreSQL default port is 5432.

To inquire port in other cases use

function hfield () { head -1 | sed -e 's/  */\t/g' | cut -f \$1 ; }
SENDQ=$(ss -tl | grep postgresql | hfield 3)
ss -tln | grep $SENDQ | hfield 4

Making PostgreSQL Service Listen to External Connections

In order to enable Exasol database to access your PostgreSQL database as a virtual schema you may need to make PostgreSQL Service listen to external connections.

See also:

Please note:

  • Accepting external connections imposes security risks on your PostgreSQL database.
  • In case you are not sure please contact your local IT security officer.
  • The following steps are only suitable for limited experiments in a secure sandbox environment.

Use sudo vi to add the following line to file /etc/postgresql/10/main/postgresql.conf:

listen_addresses = '*'

Use sudo vito add the following line to file /etc/postgresql/10/main/pg_hba.conf:

# TYPE DATABASE USER CIDR-ADDRESS  METHOD
host  all  all 0.0.0.0/0 md5

First Steps With PostgreSQL

See also "Getting started with PostgreSQL".

Check out the list of PostgreSQL Database clients to find one that suits your needs. For the following examples we chose command line client psql included in default installation.

CommandDescription
sudo apt install postgresqlInstall PostgreSQL
sudo -u postgres psql -c 'CREATE DATABASE mytest;'Create database named mytest
sudo -u postgres createuser --superuser $USERCreate a PostgreSQL user for you
psql mytestConnect to database mytest using the current user

Helpful commands in database client:

CommandComment
SELECT version();Display version of installed database
\h <command>help for command <command>
\c <database-name>connect to database <database-name>
\llist databases
\dtlist tables
\password <user>set password for user <user>
CREATE TABLE mytable columns (name VARCHAR, age INT);Create a table