Marko Kreen [Wed, 9 Sep 2009 11:09:40 +0000 (14:09 +0300)]
londiste: on error, apply sql on-by-one
Check whether last loop got error (work_state = -1)
and apply sql one-by-one if thats true.
Also, apply TRUNCATE separately from other SQL.
Marko Kreen [Wed, 9 Sep 2009 11:02:01 +0000 (14:02 +0300)]
skytools.DBScript: make work_state = -1 signal exception
If exception was thrown, set work_state = -1, to let consumer
handle next work differently.
Marko Kreen [Wed, 9 Sep 2009 10:52:58 +0000 (13:52 +0300)]
pgq.CoopConsumer for Python
Simply wrapper around Consumer which redirects few calls to pgq_coop schema.
Marko Kreen [Wed, 2 Sep 2009 17:56:41 +0000 (20:56 +0300)]
todo: merge queue loader to londiste
Marko Kreen [Wed, 2 Sep 2009 17:55:53 +0000 (20:55 +0300)]
doc: fix html generation
Marko Kreen [Wed, 2 Sep 2009 17:55:25 +0000 (20:55 +0300)]
refresh libusual
Marko Kreen [Thu, 27 Aug 2009 08:45:55 +0000 (11:45 +0300)]
londiste.local_add_table: use information_schema to get trigger info
This allows to filter out only AFTER triggers without
depending on low-level details of pg_catalog.
Marko Kreen [Thu, 27 Aug 2009 08:45:16 +0000 (11:45 +0300)]
londiste: helper function to extract parts from fqname
Marko Kreen [Thu, 27 Aug 2009 08:27:42 +0000 (11:27 +0300)]
Fetch libusual fix
Marko Kreen [Tue, 21 Jul 2009 11:19:50 +0000 (14:19 +0300)]
Merge commit 'martin/master'
Martin Pihlak [Tue, 21 Jul 2009 11:12:57 +0000 (14:12 +0300)]
Remove unused --overwrite option.
Martin Pihlak [Tue, 21 Jul 2009 10:44:06 +0000 (13:44 +0300)]
Create pg_xlog/archive_status directory for slave restore.
Patch by Mark Kirkwood.
Marko Kreen [Wed, 8 Jul 2009 15:13:12 +0000 (18:13 +0300)]
libusual: refresh
Marko Kreen [Wed, 8 Jul 2009 15:09:04 +0000 (18:09 +0300)]
sql/londiste: refresh regtests for table_attrs
Marko Kreen [Wed, 8 Jul 2009 15:07:41 +0000 (18:07 +0300)]
local_add_table: FOUND does not work with MAX()
Marko Kreen [Wed, 8 Jul 2009 15:01:11 +0000 (18:01 +0300)]
londiste: fix missing END IF and some ws in local_add_table()
Dimitri Fontaine [Wed, 8 Jul 2009 14:45:36 +0000 (16:45 +0200)]
Warn user when adding a table to replicate if it has triggers which will fire before londiste ones, and change trigger name to prefix with '_londiste_', per discussion.
Martin Pihlak [Tue, 9 Jun 2009 07:48:31 +0000 (10:48 +0300)]
Make --expect-sync use londiste.local_set_table_state()
Martin Pihlak [Tue, 9 Jun 2009 07:23:12 +0000 (10:23 +0300)]
fixed display_table to properly display long table names.
Martin Pihlak [Tue, 9 Jun 2009 07:08:39 +0000 (10:08 +0300)]
Reduced logging level for maintenance and retry commands.
Marko Kreen [Mon, 8 Jun 2009 14:27:49 +0000 (17:27 +0300)]
londiste: make --expect-sync work
Marko Kreen [Mon, 8 Jun 2009 10:14:45 +0000 (13:14 +0300)]
todo update
Marko Kreen [Mon, 8 Jun 2009 08:07:08 +0000 (11:07 +0300)]
Merge commit 'martin/master'
Marko Kreen [Mon, 8 Jun 2009 08:03:49 +0000 (11:03 +0300)]
pgq_node.set_consumer_error(): to store pending error condition
this may help admin tools which can show also pending error
of why processing last batch failed.
Martin Pihlak [Mon, 8 Jun 2009 07:46:19 +0000 (10:46 +0300)]
Fixed variable name mismatch.
Martin Pihlak [Mon, 8 Jun 2009 07:42:51 +0000 (10:42 +0300)]
Merge branch 'master' of git://github.com/markokr/skytools-dev
Marko Kreen [Mon, 8 Jun 2009 07:25:59 +0000 (10:25 +0300)]
pgq_node.set_global_watermark: ignore missing ticks
set_global_watermark() can be called with non-existing tick-ids
if worker is processing old batches.
Marko Kreen [Fri, 5 Jun 2009 12:34:06 +0000 (15:34 +0300)]
buildsystem reorg
- put python modules under 'skytools-3.0'
- install pkgloader separately
- install scripts in Makefile instead setup.py (it did not support rename)
removing .py afterwards is dangerous as we may overwrite old scripts.
- move setup.py under misc/ as it really is not usable standalone
- drop override PYTHON
Marko Kreen [Fri, 5 Jun 2009 10:32:09 +0000 (13:32 +0300)]
doc: clean up files under doc/
- move extra.css, fixman.py and getattrs.py under misc/
- move .html, .xml, .1 files to subdir
- remove londiste.5
- standardise: pgq-admin->pgqadm, londiste.cmdline -> londiste
Marko Kreen [Fri, 5 Jun 2009 10:29:05 +0000 (13:29 +0300)]
pkgloader module to be able to coexist with 2.x
Use scheme that pygtk uses to support parallel installations:
import pkgloader
pkgloader.require('skytools', '3.0')
import skytools
This will allow keeping old module installed by default and new
version is used only by request.
Marko Kreen [Fri, 5 Jun 2009 10:28:31 +0000 (13:28 +0300)]
move bulk_loader/cube_dispatcher/table_dispatcher to old/
The scripts are obsolete but kept as samples. To notify
that they are not maintained actively, move them away.
Marko Kreen [Thu, 4 Jun 2009 13:18:03 +0000 (16:18 +0300)]
londiste: replace skip_trunc columns with table attrs
this allows to store more extra data and avoid table
struct change for each item. only items that the
SQL code does not need to care about can be stored
that way.
Marko Kreen [Tue, 2 Jun 2009 10:33:14 +0000 (13:33 +0300)]
doc update
Martin Pihlak [Thu, 4 Jun 2009 13:28:10 +0000 (16:28 +0300)]
Merge branch 'master' of git://github.com/markokr/skytools-dev
Marko Kreen [Thu, 4 Jun 2009 13:22:14 +0000 (16:22 +0300)]
Merge commit 'martin/master'
Martin Pihlak [Thu, 4 Jun 2009 10:45:20 +0000 (13:45 +0300)]
Merge branch 'master' of git://github.com/markokr/skytools-dev
Martin Pihlak [Thu, 4 Jun 2009 10:42:49 +0000 (13:42 +0300)]
WalMgr backup retains symlinks for pg_log and pg_xlog.
Attempt to keep symlinks for pg_log and pg_xlog. Add a
new configuration parameter for controlling the behaviour.
Marko Kreen [Mon, 1 Jun 2009 14:02:24 +0000 (17:02 +0300)]
londiste: make compare/repair work with new cascade code
Marko Kreen [Mon, 1 Jun 2009 13:41:39 +0000 (16:41 +0300)]
update todo
Marko Kreen [Mon, 1 Jun 2009 13:32:08 +0000 (16:32 +0300)]
python/pgq: relaxed event handling
.tag_done() call is no more required. Events are by default in
'done' state.
In 2.x events were in 'retry' state by default, which was very bad
idea in retrospect. Changing them to 'untagged' and still requiring
tag_done() does not seem too good either. Original reasoning was to
detect and survive errors in scripts, but the result was only
confusion to everybody.
So instead of assuming that script may be buggy, now we assume
that script knows what it does. And only by explicit action
can they be tagged as retry.
Marko Kreen [Mon, 1 Jun 2009 13:01:37 +0000 (16:01 +0300)]
update TODO, fix londiste doc
Marko Kreen [Mon, 1 Jun 2009 13:01:01 +0000 (16:01 +0300)]
londiste: local_add_seq() - log seq name
Marko Kreen [Mon, 1 Jun 2009 12:51:54 +0000 (15:51 +0300)]
londiste: globbing, --all
Marko Kreen [Mon, 1 Jun 2009 09:30:33 +0000 (12:30 +0300)]
londiste: fix resync / missing commands
Asko Oja [Mon, 4 May 2009 14:02:39 +0000 (14:02 +0000)]
python scripts: Move template config to docstring.
* Template config is now in docstring to make to more
easy to keep up-to-date.
* dbscript: --ini option to show template config.
Marko Kreen [Mon, 1 Jun 2009 06:25:56 +0000 (09:25 +0300)]
pgqd: use strlist
Marko Kreen [Mon, 1 Jun 2009 06:14:41 +0000 (09:14 +0300)]
pgqd: support database_list
Marko Kreen [Mon, 1 Jun 2009 07:12:49 +0000 (10:12 +0300)]
upgrade libusual
Marko Kreen [Fri, 29 May 2009 11:46:01 +0000 (14:46 +0300)]
cascade: more takeover work
Marko Kreen [Wed, 13 May 2009 14:23:39 +0000 (17:23 +0300)]
docheck: allow files from cmdline
Marko Kreen [Wed, 13 May 2009 14:23:01 +0000 (17:23 +0300)]
dbscript: better desc for -q/-v
Marko Kreen [Wed, 13 May 2009 11:15:13 +0000 (14:15 +0300)]
cascade status: work on broken tree, show node type
- Show node type after name
- Allow several roots, take nodes with missing parents as roots
It still cannot work on cycles. But as the change-provider code
should avoid making those, maybe it's not worth worrying about.
Marko Kreen [Wed, 13 May 2009 10:22:49 +0000 (13:22 +0300)]
tests: move common test code to under tests/*.sh
Marko Kreen [Fri, 24 Apr 2009 14:33:39 +0000 (17:33 +0300)]
cascade: takeover
Instead of switchover/failover commands have 'takeover' command,
to be launched from new node.
Marko Kreen [Mon, 4 May 2009 12:35:02 +0000 (15:35 +0300)]
doc updates
Marko Kreen [Wed, 6 May 2009 10:36:20 +0000 (13:36 +0300)]
Merge commit 'askotm/master'
Marko Kreen [Wed, 6 May 2009 10:28:12 +0000 (13:28 +0300)]
DBScript: bad argument reference in run_safely
Marko Kreen [Wed, 6 May 2009 10:27:35 +0000 (13:27 +0300)]
CascadeAdmin: add missing import
Marko Kreen [Wed, 6 May 2009 10:26:50 +0000 (13:26 +0300)]
skytools.Config: getdict() method
Marko Kreen [Mon, 4 May 2009 11:15:46 +0000 (14:15 +0300)]
sql/*: update regtests with new messages
Asko Tiidumaa [Wed, 6 May 2009 08:01:47 +0000 (08:01 +0000)]
fixed error message
Asko Tiidumaa [Wed, 6 May 2009 08:01:08 +0000 (08:01 +0000)]
fixed error message
Asko Tiidumaa [Wed, 6 May 2009 08:00:13 +0000 (08:00 +0000)]
fixed two error messages that were copied from log(u)triga
Asko Oja [Mon, 4 May 2009 12:22:25 +0000 (12:22 +0000)]
Add querybuilder into sql tools
Querybulder is used to manage parametrisized queries both in
plpython/dbservice stored procedures and python scripts.
Marko Kreen [Mon, 4 May 2009 11:06:47 +0000 (14:06 +0300)]
Merge commit 'martin/master'
Marko Kreen [Mon, 4 May 2009 10:47:59 +0000 (13:47 +0300)]
pgq_node, londiste: improve log messages from db
londiste.global_add_table()
londiste.global_remove_table()
pgq_node.set_global_watermark()
- Replace 'Ok' with actual sentence
londiste.root_check_seqs():
- improved message, downgrade to debug level
pgq_node.set_subscriber_watermark():
- improve message
- check tick value sanity
Marko Kreen [Mon, 4 May 2009 10:35:47 +0000 (13:35 +0300)]
python/pgq/cascade: proper process_root_node() calling
CascadedWorker did not call parent class method.
Also remove pointless logging from CascadedConsumer.
Marko Kreen [Mon, 4 May 2009 10:31:02 +0000 (13:31 +0300)]
pgq.register_consumer_at(): update last seen timestamp on position move
Marko Kreen [Mon, 4 May 2009 08:39:29 +0000 (11:39 +0300)]
INSTALL: automake seems needed for aclocal
Marko Kreen [Mon, 4 May 2009 07:48:56 +0000 (10:48 +0300)]
tests/londiste: make logging verbose
Marko Kreen [Mon, 4 May 2009 07:37:00 +0000 (10:37 +0300)]
cascade: make wm publish periods configurable
This is mostly meant for testing. The options may be removed or
renamed in the future.
Also fix bug in local wm publish function
Marko Kreen [Sat, 2 May 2009 11:47:39 +0000 (14:47 +0300)]
cascade: fix watermark publishing
* CascadedWorker:
- fix time comparision in local wm handling
- publish wm also for leaf nodes
- fields node_type, node_name, local_watermark were missing in WorkerState
* pgq_node.get_node_info: on leaf node set local watermark to last consumer tick
* pgq_node.set_global_watermark: don't depend on exact code from pgq_node.get_node_info()
Trying to special-case leaf nodes does not seem to be good idea, because
then provider nodes also need to know subscriber node type. So stop doing it.
Asko Tiidumaa [Thu, 30 Apr 2009 11:19:19 +0000 (11:19 +0000)]
added a small useful example consumer
Asko Tiidumaa [Thu, 30 Apr 2009 11:17:37 +0000 (11:17 +0000)]
Merge branch 'master' of git://github.com/markokr/skytools-dev
Martin Pihlak [Thu, 30 Apr 2009 10:50:49 +0000 (13:50 +0300)]
Queue connection improvements.
- Ability to disconnect from queue by specifying empty qname.
- Verify that the queue exists before connecting.
Marko Kreen [Thu, 30 Apr 2009 10:06:54 +0000 (13:06 +0300)]
sql/ticker: make routine database detection work.
Previously databases were only detected at startup.
Martin Pihlak [Thu, 30 Apr 2009 09:53:56 +0000 (12:53 +0300)]
Finalize newadm to qadmin rename.
Martin Pihlak [Thu, 30 Apr 2009 09:32:49 +0000 (12:32 +0300)]
Create documentation directory before attempting to install.
Martin Pihlak [Thu, 30 Apr 2009 09:10:22 +0000 (12:10 +0300)]
"newadm" renamed to "qadmin"
Documentation and install scripts modified accordingly.
Marko Kreen [Thu, 30 Apr 2009 09:06:11 +0000 (12:06 +0300)]
londiste: cmd_execute() did not check ret_code of londiste.execute_start()
Also unify checking in both places - dont depend on exactly
'200' code from there.
Martin Pihlak [Thu, 30 Apr 2009 08:42:31 +0000 (11:42 +0300)]
Merge branch 'master' of git://github.com/markokr/skytools-dev
Marko Kreen [Wed, 29 Apr 2009 15:20:34 +0000 (18:20 +0300)]
londiste copy: don't give -q unconditionally to copy process.
Seems the original logic assument pgbouncer-like -q,
which only disabled stdout. But DBScript sets
global log level with it.
Martin Pihlak [Wed, 29 Apr 2009 12:14:02 +0000 (15:14 +0300)]
Merge branch 'master' of git://github.com/markokr/skytools-dev
Conflicts:
python/pgq/cascade/admin.py
Asko Tiidumaa [Wed, 29 Apr 2009 12:12:11 +0000 (12:12 +0000)]
Merge commit 'origin/master'
Marko Kreen [Wed, 29 Apr 2009 08:50:58 +0000 (11:50 +0300)]
Merge commit 'priit/master'
Priit Kustala [Tue, 28 Apr 2009 13:35:36 +0000 (13:35 +0000)]
londiste: unregister fix in playback.py
Marko Kreen [Tue, 28 Apr 2009 19:53:44 +0000 (22:53 +0300)]
sql/ticker: ifdef SIGPIPE, SIGHUP for win32
Marko Kreen [Tue, 28 Apr 2009 19:48:08 +0000 (22:48 +0300)]
cquoting: compat macros for MSC, minor cleanups
- MSC: macros for 'inline', 'strcasecmp'
- Use stdbool.h instead custom enum for 'bool'.
Marko Kreen [Tue, 28 Apr 2009 19:44:33 +0000 (22:44 +0300)]
devnotes: better formatting
Marko Kreen [Tue, 28 Apr 2009 19:43:47 +0000 (22:43 +0300)]
tag the tree as 3.0git
Marko Kreen [Tue, 28 Apr 2009 19:42:26 +0000 (22:42 +0300)]
sql/: Use more portable sed expression to get list of files.
Old expression was not sed 3.x compatible, used in mingw.
Marko Kreen [Tue, 28 Apr 2009 11:45:46 +0000 (14:45 +0300)]
londiste add-table: if schema is missing, create
Marko Kreen [Tue, 28 Apr 2009 11:44:55 +0000 (14:44 +0300)]
doc/devnotes: describe git usage more
Marko Kreen [Tue, 28 Apr 2009 11:44:27 +0000 (14:44 +0300)]
docs: nicer code blocks
Marko Kreen [Mon, 27 Apr 2009 19:49:46 +0000 (22:49 +0300)]
skytools.Config: use config file name as default job_name
Marko Kreen [Tue, 28 Apr 2009 11:51:10 +0000 (14:51 +0300)]
DBScript: avoid double config reload
also remove pointless job_name default, as it is already
handled in Config class.
Marko Kreen [Fri, 24 Apr 2009 14:32:28 +0000 (17:32 +0300)]
scripting: unify exception handling, show db name
Have single place where exceptions are handled.
psycopg attaches .cursor to each exception,
use that to show connection name in error messages.
Priit Kustala [Tue, 28 Apr 2009 10:25:38 +0000 (10:25 +0000)]
Decrease log level in pgq_node.get_node_info.sql and pgq_node.get_consumer_state.sql
Priit Kustala [Mon, 27 Apr 2009 13:44:58 +0000 (13:44 +0000)]
fix in admin.py in get_node_subscriber_list ... remove local_watermark column from select
AskoTiidumaa [Mon, 27 Apr 2009 10:51:19 +0000 (10:51 +0000)]
hello world