PostgreSQLΒΆ
To implement the conversion of relational data to graph data using GART, the data source needs to be configured with the necessary permissions. Here is an example of PostgreSQL.
The PostgreSQL configuration file is in the directory /etc/postgresql/$PSQL_VERSION/main/
. In our docker image, the PostgreSQL version is 16, so the configuration file is in the directory /etc/postgresql/16/main/
.
Modify the configuration file
postgresql.conf
to enable WAL as follows:
wal_level = logical
max_replication_slots = 10 # larger than 0, default is 10
max_wal_senders = 10 # larger than 0, default is 10
Create a PostgreSQL user (
dbuser
) for the log capture Debezium:
1CREATE USER dbuser WITH PASSWORD '123456';
2ALTER USER dbuser REPLICATION;
3ALTER USER dbuser LOGIN;
4GRANT pg_read_server_files TO dbuser; -- For loading CSV files
5
6CREATE DATABASE ldbc;
7GRANT ALL ON DATABASE ldbc TO dbuser;
Switch to the database
ldbc
and create the schemapublic
:
\c ldbc
GRANT ALL ON SCHEMA public TO dbuser;
Modify the configuration file
/etc/postgresql/$PSQL_VERSION/main/pg_hba.conf
to trust the userdbuser
:
local replication dbuser trust
host replication dbuser 127.0.0.1/32 trust
host replication dbuser ::1/128 trust
Restart PostgreSQL:
gart-env$ sudo /etc/init.d/postgresql restart