Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* #55: Updated documentation Co-authored-by: Sebastian Bär <redcatbear@ursus-minor.de>
- Loading branch information
Showing
10 changed files
with
222 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Virtual Schema for PostgreSQL 2.0.4, released 2022-08-29 | ||
|
||
Code name: Documentation and Dependencies update | ||
|
||
## Summary | ||
|
||
Fixed vulnerability [sonatype-2022-4402](https://ossindex.sonatype.org/vulnerability/sonatype-2022-4402) reported by ossindex for dependency [org.postgresql:postgresql:jar:42.4.0](https://ossindex.sonatype.org/component/pkg:maven/org.postgresql/postgresql@42.4.0?utm_source=ossindex-client&utm_medium=integration&utm_content=1.8.1) in compile by updating dependency. | ||
|
||
Updated documentation, fixed broken links added information specific to PostgreSQL virtual schemas. | ||
|
||
## Documentation | ||
|
||
* #55: Updated documentation | ||
|
||
## Dependency Updates | ||
|
||
### Compile Dependency Updates | ||
|
||
* Updated `org.postgresql:postgresql:42.4.0` to `42.5.0` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# Developers Guide | ||
|
||
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: | ||
|
||
```shell | ||
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](../user_guide/postgresql_user_guide.md#creating-a-virtual-schema) you can enable remote access to information logged by the virtual schema adapter see [Remote logging](https://docs.exasol.com/db/latest/database_concepts/virtual_schema/logging.htm). | ||
|
||
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 | ||
|
||
```shell | ||
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: | ||
|
||
* [Configuring PostgreSQL to allow remote connections](https://www.bigbinary.com/blog/configure-postgresql-to-allow-remote-connection) | ||
* ["FATAL: no pg_hba.conf entry for host" (Stackoverflow)](https://dba.stackexchange.com/questions/83984/connect-to-postgresql-server-fatal-no-pg-hba-conf-entry-for-host)]https://dba.stackexchange.com/questions/83984/ | ||
|
||
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 vi`to 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"](https://www3.ntu.edu.sg/home/ehchua/programming/sql/PostgreSQL_GetStarted.html). | ||
|
||
Check out the list of [PostgreSQL Database clients](https://wiki.postgresql.org/wiki/PostgreSQL_Clients) to find one that suits your needs. | ||
For the following examples we chose command line client `psql` included in default installation. | ||
|
||
| Command | Description | | ||
|---------|-------------| | ||
| `sudo apt install postgresql` | Install PostgreSQL | | ||
| `sudo -u postgres psql -c 'CREATE DATABASE mytest;'` | Create database named `mytest` | | ||
| `sudo -u postgres createuser --superuser $USER` | Create a PostgreSQL user for you | | ||
| `psql mytest` | Connect to database `mytest` using the current user | | ||
|
||
Helpful commands in database client: | ||
|
||
| Command | Comment | | ||
| -------- | --------- | | ||
| `SELECT version();` | Display version of installed database | | ||
| `\h <command>` | help for command `<command>` | | ||
| `\c <database-name>` | connect to database `<database-name>` | | ||
| `\l` | list databases | | ||
| `\dt` | list tables | | ||
| `\password <user>` | set password for user `<user>` | | ||
| `CREATE TABLE mytable columns (name VARCHAR, age INT);` | Create a table | | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.