diff options
author | Marko Kreen | 2009-05-04 12:35:02 +0000 |
---|---|---|
committer | Marko Kreen | 2009-06-01 07:13:47 +0000 |
commit | 012e461a6a8ace2bd854515118f7bcf33e8577e2 (patch) | |
tree | eb0457527e64aab0fffda15f4420fc94b6cb94f7 | |
parent | eea35fd754cc63401d7cc5b6681786b89c34f95f (diff) |
doc updates
-rw-r--r-- | doc/TODO.txt | 23 | ||||
-rw-r--r-- | doc/devnotes.txt | 12 | ||||
-rw-r--r-- | doc/londiste.cmdline.txt | 55 | ||||
-rw-r--r-- | doc/londiste.ref.txt | 7 |
4 files changed, 53 insertions, 44 deletions
diff --git a/doc/TODO.txt b/doc/TODO.txt index b425e703..a23fcba8 100644 --- a/doc/TODO.txt +++ b/doc/TODO.txt @@ -5,9 +5,13 @@ In angular brackets after item is assumed complexity [easy, moderate, complex], wheter it is good to have it in 3.0, and maybe also developer name who already is handling it. -== Required for 3.0-alpha == +== Required for 3.0a2 == -* londiste demo +* resync +* missing +* takeover +* status with dead nodes +* execute --wait == Required for 3.0-final == @@ -21,25 +25,20 @@ who already is handling it. * londiste.ref.txt update with new commands [moderate] -* Re-introduce lost Londiste features: - - check +* Re-introduce lost Londiste features, that were lost when lot of interaction code was moved to database: + - compare/repair - fkeys + - missing - globbing - They were lost when lot of interaction code was moved to database. - Now we need to get them working again. - [easy - need to port 2.1 code] + - `--all` + - [easy - need to port 2.1 code] * Refresh default .ini files, add comments. Alternative: have defailt .ini in script docstring, have DBScript switch to dump it. [easy] -* Dead node handling / failover. We have working switchover, - now need to able to do it with some nodes dead. - [complex] - * New ticker: - - handle connection errors (maybe works already?) - operate only on databases specified in config == Good to have changes == diff --git a/doc/devnotes.txt b/doc/devnotes.txt index 5863bbfd..a168986c 100644 --- a/doc/devnotes.txt +++ b/doc/devnotes.txt @@ -142,7 +142,11 @@ Add your own writable repo, named 'self': $ cd skytools-dev $ git remote add self [email protected]:${username}/skytools-dev.git -Fetch changes from upstream repo +Push initial contents into it: + + $ git push self master + +Fetch changes from upstream repo into branch 'origin/master', but do not merge into local 'master': $ git fetch origin @@ -150,13 +154,13 @@ See changes in upstream repo: $ git log [-p] origin/master -Merge changes from upstream repo: +Merge changes from upstream repo into currently checked out branch: $ git merge origin/master -Alternative: do fetch+merge in one go: +Alternative: do fetch+merge in one go (assuming you are in 'master' branch): - $ git pull origin . + $ git pull Commit a change, push to your repo (on 'master' branch): diff --git a/doc/londiste.cmdline.txt b/doc/londiste.cmdline.txt index 595e9b1b..8fa0efd9 100644 --- a/doc/londiste.cmdline.txt +++ b/doc/londiste.cmdline.txt @@ -42,31 +42,37 @@ steps: 1. create the subscriber database, with tables to replicate - 2. edit a londiste configuration file, say conf.ini, and a PgQ ticker - configuration file, say ticker.ini + 2. install pgq on both databases and launch pgq daemon. - 3. install londiste on the provider and subscriber nodes. This step - requires admin privileges on both provider and subscriber sides, - and both install commands can be run remotely: + $ edit pgqadm-master.ini + $ edit pgqadm-slave.ini + $ pgqadm pgqadm-master.ini install + $ pgqadm pgqadm-slave.ini install + $ pgqadm pgqadm-master.ini ticker -d + $ pgqadm pgqadm-slave.ini ticker -d - $ londiste.py conf.ini provider install - $ londiste.py conf.ini subscriber install + 2. create londiste config file for both databases. - 4. launch the PgQ ticker on the provider machine: + $ edit londiste-master.ini + $ edit londiste-slave.ini - $ pgqadm.py -d ticker.ini ticker + 3. create londiste nodes. this also installs londiste code. - 5. launch the londiste replay process: + $ londiste londiste-master.ini create-root master + $ londiste londiste-slave.ini create-branch slave --provider="master's connstr" - $ londiste.py -d conf.ini replay + 4. launch londiste daemons for both databases. - 6. add tables to replicate from the provider database: + $ londiste londiste-master.ini replay -d + $ londiste londiste-slave.ini replay -d - $ londiste.py conf.ini provider add table1 table2 ... + 5. add tables to master - 7. add tables to replicate to the subscriber database: + $ londiste londiste-master.ini add-table mytbl1 mytbl2 - $ londiste.py conf.ini subscriber add table1 table2 ... + 6. add tables to slave + + $ londiste londiste-slave.ini add-table mytbl1 mytbl2 To replicate to more than one subscriber database just repeat each of the described subscriber steps for each subscriber. @@ -92,25 +98,24 @@ command. make program more verbose -== PROVIDER COMMANDS == - - $ londiste.py config.ini provider <command> +== CASCADING COMMANDS == -Where command is one of: - -=== provider install === +=== install === Installs code into provider and subscriber database and creates queue. Equivalent to doing following by hand: CREATE LANGUAGE plpgsql; - CREATE LANGUAGE plpython; \i .../contrib/txid.sql \i .../contrib/pgq.sql + \i .../contrib/pgq_node.sql \i .../contrib/londiste.sql - select pgq.create_queue(queue name); -=== provider add <table name> ... === +=== create-root === +=== create-branch === +=== create-leaf === + +=== add-table <table name> ... === Registers table(s) on the provider database and adds the londiste trigger to the table(s) which will send events to the queue. Table names can be schema @@ -120,7 +125,7 @@ qualified with the schema name defaulting to public if not supplied. Register all tables in provider database, except those that are under schemas 'pgq', 'londiste', 'information_schema' or 'pg_*'. -=== provider remove <table name> ... === +=== remove-table <table name> ... === Unregisters table(s) on the provider side and removes the londiste triggers from the table(s). The table removal event is also sent to the queue, so all diff --git a/doc/londiste.ref.txt b/doc/londiste.ref.txt index 5524f84e..a7cf4a84 100644 --- a/doc/londiste.ref.txt +++ b/doc/londiste.ref.txt @@ -53,7 +53,7 @@ This event will be inserted by 'londiste add-table' on root. * ev_type = 'londiste.add-table' * ev_data = table name -All subscribers downstream will also registister this table +All subscribers downstream will also register this table as being available on the queue. ==== Table removal event ==== @@ -74,9 +74,10 @@ The insert happens in same TX as the actual command are executed. * ev_type = 'EXECUTE' * ev_data = script body - * ev_extra1 = script name + * ev_extra1 = unique id for script (file name?) -Script name is used as unique ID - the event is registered as applied. +Script is identified by name - it is used to check if it is already applied. +This allows to override scripts in downstream nodes. == log file == |