The PostgreSQL adaptor is capable of reading and tailing databases.
src_type=postgres
src_uri=postgres://127.0.0.1:5432/test
tail=false
dest_type=elasticsearch
dest_uri=https://USERID:PASS@scalr.api.appbase.io/APPNAME
For the destination URI, instead of using your user-id and password, you could also use your admin API key.
https://admin-API-key@scalr.api.appbase.io/APPNAME
You can find your admin API key inside your app page at appbase.io under Security -> API Credentials.
- When using postgres as source, append
?sslmode=disable
to the uri to disable ssl otherwise you will have to put a certificate.
- When using
tail: true
with postgres, you might get the errormust be superuser or replication role to use replication slots
. You need a REPLICATION role for this to work. (See ALTER role) - When tailing, you might have to create replication slots. Also set
wal_level
.
wal_level=logical
max_replication_slots=1
- Create a logical replication slot for the source database. (Logical)
select * from pg_create_logical_replication_slot('standby_replication_slot', 'test_decoding');
SELECT * FROM pg_replication_slots ;
- Make sure you see the
database name
in replication slot row. Now updatereplication_slot
parameter of pipeline.js to 'standby_replication_slot'