ergo70 / TRAKTOR

TRAKTOR: Set up true multimaster replication clusters with vanilla PostgreSQL servers.
MIT License
31 stars 1 forks source link

some issues with setup and permissions #2

Open brendankearney opened 6 months ago

brendankearney commented 6 months ago

first, thank you for this project. i am very interested in getting PG setup with N-way Multi-Provider, and this seems to be a giant leap forward to accomplish that.

i have 3 separate instances of PG (16.2, from the PG repos) running and i am trying to setup traktor. the initial setup is failing, as none of that "schema" work is being accomplished. none of the tables, functions, triggers, etc are being created. everything comes to a stop when the triggers are being created. i used the lower privilege method to create the traktor user (i.e without superuser privs), and this results in nothing being created in the database. it seems that having the "install" of the database run by a superuser is necessary, while it is sufficient to run traktor with lower privs. would breaking things into two be an option?

i am in no way, shape or form a developer, and at best i can muddle my way through some bash scripts, so please take anything here with a grain of salt. i have copied the "CREATE" statements out of arbiter.py, and tried to run them in PGAdmin4, to manually create the database "innards". it seems there is a bug in the creation of trktr.v_status, as PGAdmin shows: ERROR: syntax error at or near "{" LINE 30: AS SELECT {} as node_id, ^

in addition, there are some other functions that are created, where shell callouts are made to determine some values such as trktr.tf_trktr_break_cycle. this does not work when put into PGAdmin, and i dont know if i can use this method to manually create the tables, functions, etc. is there any insight into what i can do to manually create everything in the tutorial database?

thanks in advance, brendan

ergo70 commented 6 months ago

Sorry for being late. This:

AS SELECT {} as node_id, does not work because it's a Python format string. The {} is replaced by an actual value before executing the statement.

To get things up and running I think you can safely create everything as a superuser. As long as this is for experimenting it should be fine.

best regards

Ernst-Georg