skytools.git
14 years agopgq_node.version(): 3.0.0.8
Marko Kreen [Fri, 17 Jun 2011 11:36:45 +0000 (14:36 +0300)]
pgq_node.version(): 3.0.0.8

14 years agolondiste.handlers.dispatch: use 'global' instead 'globals()[]'
Marko Kreen [Fri, 17 Jun 2011 11:27:45 +0000 (14:27 +0300)]
londiste.handlers.dispatch: use 'global' instead 'globals()[]'

14 years agofix: table rules are incorrect after londiste3 table (re)sync
Egon Valdmees [Thu, 16 Jun 2011 12:09:57 +0000 (15:09 +0300)]
fix: table rules are incorrect after londiste3 table (re)sync

14 years agopart handler
Egon Valdmees [Tue, 14 Jun 2011 13:50:53 +0000 (16:50 +0300)]
part handler

handler adds trigger argument to full extra3 field with hash value and
filter to event_processing and full_copy

14 years agosqltools.full_copy variable name fix
Egon Valdmees [Wed, 15 Jun 2011 11:22:41 +0000 (14:22 +0300)]
sqltools.full_copy variable name fix

14 years agosort table list by name
Egon Valdmees [Wed, 8 Jun 2011 08:56:53 +0000 (11:56 +0300)]
sort table list by name

14 years agofix for "NoneType object not subscriptable" error in dispatcher encoding validation
Egon Valdmees [Tue, 7 Jun 2011 14:32:06 +0000 (17:32 +0300)]
fix for "NoneType object not subscriptable" error in dispatcher encoding validation

14 years agofixed merge testcode
Egon Valdmees [Tue, 7 Jun 2011 12:49:00 +0000 (15:49 +0300)]
fixed merge testcode

14 years agoleaf branch now accepts add-table events
Egon Valdmees [Tue, 7 Jun 2011 12:24:53 +0000 (15:24 +0300)]
leaf branch now accepts add-table events

14 years agofake_local and qsplitter handlers
Egon Valdmees [Wed, 1 Jun 2011 14:07:36 +0000 (17:07 +0300)]
fake_local and qsplitter handlers

added new handlers:
* fake_local  - dummy handler to setup queue tables. All events are ignored. Table structure is not required. Use in branch/leaf
* qsplitter  -  dummy handler to setup queue tables. All events are ignored. Table structure is not required. All table events are inserted to destination queue, specified with handler arg 'queue'.

changed local_add_table to allow adding of non-existing tables

14 years agorenamed direct handler func name
Egon Valdmees [Wed, 1 Jun 2011 14:02:01 +0000 (17:02 +0300)]
renamed direct handler func name

14 years agoMerge branch 'master' of lux-dbeer:code/skytools-3
Egon Valdmees [Wed, 1 Jun 2011 07:20:14 +0000 (10:20 +0300)]
Merge branch 'master' of lux-dbeer:code/skytools-3

14 years agono crash when column detection fails
Egon Valdmees [Wed, 1 Jun 2011 06:46:57 +0000 (09:46 +0300)]
no crash when column detection fails

14 years agoMerge branch 'master' of https://github.com/markokr/skytools
Egon Valdmees [Wed, 1 Jun 2011 06:38:34 +0000 (06:38 +0000)]
Merge branch 'master' of https://github.com/markokr/skytools

14 years agodirect handler
Egon Valdmees [Tue, 31 May 2011 12:00:24 +0000 (15:00 +0300)]
direct handler

direct handler is functionally identical with
table handler (default when no handler specified),
but uses dispatch handler logic

14 years agoerror when fixing utf8 in rows with null values
Egon Valdmees [Tue, 31 May 2011 11:58:59 +0000 (14:58 +0300)]
error when fixing utf8 in rows with null values

14 years agocascade event log level to debug
Egon Valdmees [Mon, 30 May 2011 13:20:41 +0000 (16:20 +0300)]
cascade event log level to debug

14 years agoskytools.Config: switch to turn off all default values
Marko Kreen [Tue, 31 May 2011 08:11:13 +0000 (11:11 +0300)]
skytools.Config: switch to turn off all default values

14 years agotable locality check for multi-source leaf
Egon Valdmees [Thu, 26 May 2011 13:52:44 +0000 (16:52 +0300)]
table locality check for multi-source leaf

14 years agosubconsumer (un)registration to qadmin
Egon Valdmees [Fri, 13 May 2011 12:03:18 +0000 (15:03 +0300)]
subconsumer (un)registration to qadmin

14 years agoOCM-2211 pgq_coop doesnt remove timed out subconsumers without active batch
Egon Valdmees [Mon, 9 May 2011 13:54:53 +0000 (16:54 +0300)]
OCM-2211 pgq_coop doesnt remove timed out subconsumers without active batch

14 years agoOCM-2279: londiste3 should translate everything to utf8, in a lossy way
Egon Valdmees [Thu, 5 May 2011 12:37:54 +0000 (15:37 +0300)]
OCM-2279: londiste3 should translate everything to utf8, in a lossy way
where appropriate

* added argument 'encoding' to dispatcher handler
* tests for invalid utf8 sequences
* support for renamed table copy in dispatcher handler

14 years agotable name and columns change support for full_copy
Egon Valdmees [Tue, 8 Feb 2011 13:20:11 +0000 (15:20 +0200)]
table name and columns change support for full_copy

added support for destination table and columns with
different name than source

14 years agoapplyfunc handler
Marko Kreen [Fri, 6 May 2011 13:44:14 +0000 (16:44 +0300)]
applyfunc handler

14 years agofixed failed sync exit code
Tarvi Pillessaar [Wed, 27 Apr 2011 09:48:29 +0000 (09:48 +0000)]
fixed failed sync exit code

14 years agopgq.triggers: Fix potential rare crash.
Marko Kreen [Tue, 19 Apr 2011 21:03:32 +0000 (00:03 +0300)]
pgq.triggers: Fix potential rare crash.

The bad hash_search(HASH_ENTER) + SPI_execute() pattern
is used here also.  Fix it by always properly initializing
the info structure.

The similar pattern exist also in PgqTriggerInfo, but that
is already handled via ->finalized flag.

14 years agopgq.insert_event: Fix rare crash
Marko Kreen [Tue, 19 Apr 2011 20:22:08 +0000 (23:22 +0300)]
pgq.insert_event: Fix rare crash

If hash_search(HASH_ENTER) succeeds, but make_plan() fails,
due to statement_timeout/deadlock, then HTAB entry will
contain invalid values which leads to crash on next call.

Fix it by always fully initializing struct before calling make_plan().

Debugged-by: Martin Pihlak
14 years agomake deb: shortcut for unofficial packages
Marko Kreen [Fri, 15 Apr 2011 10:19:28 +0000 (13:19 +0300)]
make deb: shortcut for unofficial packages

14 years agodeb: Improve dependencies
Marko Kreen [Fri, 15 Apr 2011 09:14:15 +0000 (12:14 +0300)]
deb: Improve dependencies

Source:
- Ticker is not built with libevent-dev
- python-psycopg2 is not needed for building

python-pgq3
- Depends on python-psycopg2

skytools3-walmgr:
- Depends on python-psycopg2
- Does not depend on postgresql-server, it is reasonable to use
  it to manage non-debian Postgres instances.  Make it 'Enhances:'
  instead.

python-skytools3:
- Suggest: python-psycopg2.  Needed for DB functionality, not otherwise.

14 years agoskytools.natsort: natural sorting of strings
Marko Kreen [Tue, 12 Apr 2011 08:39:38 +0000 (11:39 +0300)]
skytools.natsort: natural sorting of strings

14 years agoskytools: Option of non-lazy loading for various checkers
Marko Kreen [Thu, 7 Apr 2011 12:58:03 +0000 (15:58 +0300)]
skytools: Option of non-lazy loading for various checkers

14 years agoskytools: Separate generic scripting from DBScript
Marko Kreen [Thu, 7 Apr 2011 12:57:28 +0000 (15:57 +0300)]
skytools: Separate generic scripting from DBScript

14 years agosplit skytools3 in several packages for debian
Dimitri Fontaine [Thu, 31 Mar 2011 13:41:01 +0000 (15:41 +0200)]
split skytools3 in several packages for debian

skytools3              Skytool's replication and queuing
python-pgq3            Skytool's PGQ python library
python-skytools3       python scripts framework for skytools
skytools-ticker3       PGQ ticker daemon service
skytools-walmgr3       high-availability archive and restore commands
postgresql-8.4-pgq3    PGQ server-side code (C module for PostgreSQL)
postgresql-9.0-pgq3    PGQ server-side code (C module for PostgreSQL)

You can install your script in /etc/skytools/*.ini and the skytools package
will try to start them automatically, using scriptmgr.  Of course you still
need to install pgq for ticker services and londiste for replication.

14 years agoOCM-1524: merge_all switch for non-queue merge leaf
Egon Valdmees [Tue, 12 Apr 2011 11:00:14 +0000 (14:00 +0300)]
OCM-1524: merge_all switch for non-queue merge leaf

14 years agoOCM-1524: syntax error fix and added tests
Egon Valdmees [Mon, 11 Apr 2011 12:53:44 +0000 (15:53 +0300)]
OCM-1524: syntax error fix and added tests

14 years agoOCM-704: creating merge-leaf with non-existing queue on leaf side should throw an...
Egon Valdmees [Fri, 8 Apr 2011 14:20:09 +0000 (17:20 +0300)]
OCM-704: creating merge-leaf with non-existing queue on leaf side should throw an error

14 years agoOCM-1581: skytools3 script error "Config value not set: subconsumer_timeout"
Egon Valdmees [Fri, 8 Apr 2011 14:19:47 +0000 (17:19 +0300)]
OCM-1581: skytools3 script error "Config value not set: subconsumer_timeout"

14 years agoOCM-1538: londiste3 qtable plugin behaves dangerously when adding skip trigger to...
Egon Valdmees [Fri, 8 Apr 2011 14:16:28 +0000 (17:16 +0300)]
OCM-1538: londiste3 qtable plugin behaves dangerously when adding skip trigger to a existing queue table

14 years agoOCM-1524: adding table to n:1 cascade merge should work as with merge-leaf scenario
Egon Valdmees [Fri, 8 Apr 2011 14:15:22 +0000 (17:15 +0300)]
OCM-1524: adding table to n:1 cascade merge should work as with merge-leaf scenario

14 years agoAvoid direct symbol imports
Marko Kreen [Wed, 6 Apr 2011 17:42:31 +0000 (20:42 +0300)]
Avoid direct symbol imports

Always use

  import skytools
  def xx():
   skytools.foo

this allows maximum laziness when importing.

14 years agorefresh libusual
Marko Kreen [Wed, 6 Apr 2011 16:35:53 +0000 (19:35 +0300)]
refresh libusual

14 years agoskytools: Convert __init__ module to apipkg
Marko Kreen [Wed, 6 Apr 2011 16:13:06 +0000 (19:13 +0300)]
skytools: Convert __init__ module to apipkg

14 years agoskytools: Include apipkg module
Marko Kreen [Wed, 6 Apr 2011 16:09:52 +0000 (19:09 +0300)]
skytools: Include apipkg module

Include Holger Krekel's apipkg module in skytools.

It allows top module to lazily load symbols from submodules.

14 years agolondiste.setup: simplify table attr show expression
Marko Kreen [Wed, 6 Apr 2011 09:25:16 +0000 (12:25 +0300)]
londiste.setup: simplify table attr show expression

14 years agoAdded "compression" to master config template.
Martin Pihlak [Mon, 4 Apr 2011 07:04:44 +0000 (10:04 +0300)]
Added "compression" to master config template.

14 years agoignore missing authorized_keys file on wal slave cleanup.
Martin Pihlak [Fri, 1 Apr 2011 12:22:07 +0000 (15:22 +0300)]
ignore missing authorized_keys file on wal slave cleanup.

14 years agoMerge branch 'master' of internal-git:/git/dba/skytools-3
Martin Pihlak [Thu, 31 Mar 2011 11:05:19 +0000 (14:05 +0300)]
Merge branch 'master' of internal-git:/git/dba/skytools-3

14 years agodebian: Instead depending, suggest skytools-modules
Marko Kreen [Tue, 29 Mar 2011 13:29:20 +0000 (16:29 +0300)]
debian: Instead depending, suggest skytools-modules

14 years ago.gitignore: added *~ and .DS_Store
martinko [Thu, 24 Mar 2011 15:27:24 +0000 (16:27 +0100)]
.gitignore: added *~ and .DS_Store

Added ignoring of VIM's backup files and Mac OS X Finder's custom
folder attributes' files.

14 years agofix pid writing in slave xlock.
Martin Pihlak [Thu, 24 Mar 2011 11:01:06 +0000 (13:01 +0200)]
fix pid writing in slave xlock.

Slave xlock should not attempt to write pid to BACKUPLOCK
if none was specified on command line.

14 years agopython/pkgloader.py: removed duplicate raise
martinko [Thu, 24 Mar 2011 10:44:41 +0000 (11:44 +0100)]
python/pkgloader.py: removed duplicate raise

14 years agogenerated handlers have keep_latest as default row_mode
Egon Valdmees [Tue, 22 Mar 2011 14:38:46 +0000 (14:38 +0000)]
generated handlers have keep_latest as default row_mode

14 years agofix: temp table schema & quoting, update & delete sql, bulk load count checks
Egon Valdmees [Tue, 22 Mar 2011 13:56:50 +0000 (13:56 +0000)]
fix: temp table schema & quoting, update & delete sql, bulk load count checks

14 years agoremoved next arg from generated dispatcher handler init
Egon Valdmees [Tue, 22 Mar 2011 11:03:15 +0000 (11:03 +0000)]
removed next arg from generated dispatcher handler init

14 years agofix --ssh-add-key with missing authorized_keys file
Martin Pihlak [Fri, 18 Mar 2011 11:47:58 +0000 (13:47 +0200)]
fix --ssh-add-key with missing authorized_keys file

14 years agoempty handler bug fix
Egon Valdmees [Thu, 17 Mar 2011 21:58:13 +0000 (21:58 +0000)]
empty handler bug fix

14 years agoCouple of bugfixes for stale backup lock handling.
Martin Pihlak [Thu, 17 Mar 2011 19:03:29 +0000 (21:03 +0200)]
Couple of bugfixes for stale backup lock handling.

14 years agoMove the pg_stop_backup() into a finally: block.
Steve Singer [Thu, 17 Mar 2011 18:18:45 +0000 (20:18 +0200)]
Move the pg_stop_backup() into a finally: block.
Some instances were reported where the base backup failed with some issue
but pg_stop_backup() hadn't been called and had to be called manually.
This should make that less likely

14 years agoAdd support for detecting stale locks and releasing them instead of aborting
Steve Singer [Thu, 17 Mar 2011 18:17:23 +0000 (20:17 +0200)]
Add support for detecting stale locks and releasing them instead of aborting

14 years agowalmgr.py: add "cleanup" command
Martin Pihlak [Wed, 16 Mar 2011 11:12:08 +0000 (13:12 +0200)]
walmgr.py: add "cleanup" command

14 years agomodernize wal-master.ini
Martin Pihlak [Wed, 16 Mar 2011 11:11:35 +0000 (13:11 +0200)]
modernize wal-master.ini

14 years agodoc/todo: expand some points
Marko Kreen [Wed, 23 Feb 2011 12:41:30 +0000 (14:41 +0200)]
doc/todo: expand some points

14 years agotodo cleanup
Marko Kreen [Wed, 23 Feb 2011 11:56:52 +0000 (13:56 +0200)]
todo cleanup

14 years agomake test: quickly test doctest-enabled modules
Marko Kreen [Wed, 23 Feb 2011 11:54:26 +0000 (13:54 +0200)]
make test: quickly test doctest-enabled modules

14 years agocascade status: avoid negative lag, sort by name
Marko Kreen [Wed, 23 Feb 2011 11:49:49 +0000 (13:49 +0200)]
cascade status: avoid negative lag, sort by name

negative lag can happen if info fetching takes too long.

14 years agoCoopConsumer: subconsumer_timeout config param
Marko Kreen [Wed, 23 Feb 2011 11:49:15 +0000 (13:49 +0200)]
CoopConsumer: subconsumer_timeout config param

14 years agoMerge remote-tracking branch 'intgit/master'
Marko Kreen [Wed, 16 Feb 2011 11:35:24 +0000 (13:35 +0200)]
Merge remote-tracking branch 'intgit/master'

14 years agobump db ver
Marko Kreen [Wed, 16 Feb 2011 11:29:29 +0000 (13:29 +0200)]
bump db ver

14 years agopgq_coop: add version() function
Marko Kreen [Wed, 16 Feb 2011 11:27:31 +0000 (13:27 +0200)]
pgq_coop: add version() function

14 years agopgq_coop: add possibility to take over dead subconsumer batch
Marko Kreen [Wed, 16 Feb 2011 11:26:57 +0000 (13:26 +0200)]
pgq_coop: add possibility to take over dead subconsumer batch

14 years agoDispatcher handler
Egon Valdmees [Fri, 11 Feb 2011 13:39:04 +0000 (15:39 +0200)]
Dispatcher handler

14 years agobulk-handler: sync with new api, add GP compat
Marko Kreen [Fri, 11 Feb 2011 13:36:20 +0000 (15:36 +0200)]
bulk-handler: sync with new api, add GP compat

14 years agolondiste: new qtable handler
Marko Kreen [Fri, 11 Feb 2011 13:34:44 +0000 (15:34 +0200)]
londiste: new qtable handler

14 years agolondiste; drop chained handler, use single handler per table
Marko Kreen [Fri, 11 Feb 2011 13:31:47 +0000 (15:31 +0200)]
londiste; drop chained handler, use single handler per table

Original idea was to let admins cascade different handlers,
but that seems too complicated.  Instead let programmer
use subclassing to create handlers with required functionality.

14 years agodbstruct: GP dist key support
Egon Valdmees [Fri, 11 Feb 2011 11:43:53 +0000 (13:43 +0200)]
dbstruct: GP dist key support

14 years agoAdminScript.display_table: allow field formatter function
Egon Valdmees [Fri, 11 Feb 2011 11:35:19 +0000 (13:35 +0200)]
AdminScript.display_table: allow field formatter function

14 years agoserialconsumer: fix batch_info usage
Marko Kreen [Fri, 11 Feb 2011 13:29:20 +0000 (15:29 +0200)]
serialconsumer: fix batch_info usage

14 years agogitignore: dont ignore too much
Marko Kreen [Fri, 11 Feb 2011 13:51:25 +0000 (15:51 +0200)]
gitignore: dont ignore too much

14 years agoSSH batch mode and no strict host checking for remote_walmgr
Martin Pihlak [Wed, 9 Feb 2011 13:12:47 +0000 (13:12 +0000)]
SSH batch mode and no strict host checking for remote_walmgr

14 years agoCreate log,pid,conf directories during --init
Martin Pihlak [Wed, 9 Feb 2011 13:08:33 +0000 (13:08 +0000)]
Create log,pid,conf directories during --init

14 years agodbscript: make db service-api errors noiseless
Marko Kreen [Wed, 9 Feb 2011 12:05:04 +0000 (14:05 +0200)]
dbscript: make db service-api errors noiseless

14 years agopython/pgq: batch_info cleanup
Marko Kreen [Fri, 4 Feb 2011 15:13:41 +0000 (17:13 +0200)]
python/pgq: batch_info cleanup

- move batch_info compat from sql to python
- get rid of get_batch_info(), self.batch_info is always defined
- make remoteconsumer use self.batch_info

14 years agosql/pgq: separate out the truncate trigger tests
Marko Kreen [Fri, 4 Feb 2011 15:08:37 +0000 (17:08 +0200)]
sql/pgq: separate out the truncate trigger tests

this makes success/failure on 8.3 clearer.

14 years agopgq.get_queue_info: report last tick in queue
Marko Kreen [Fri, 4 Feb 2011 14:59:34 +0000 (16:59 +0200)]
pgq.get_queue_info: report last tick in queue

14 years agopgq_node.get_worker_state: new function
Marko Kreen [Fri, 4 Feb 2011 14:44:30 +0000 (16:44 +0200)]
pgq_node.get_worker_state: new function

combines get_node_info & get_consumer_info

14 years agocascadedworker: fix tick tx handling on branch
Marko Kreen [Wed, 2 Feb 2011 13:51:49 +0000 (15:51 +0200)]
cascadedworker: fix tick tx handling on branch

14 years agopgqd: set defaults for pidfile & logfile
Marko Kreen [Tue, 1 Feb 2011 12:56:14 +0000 (14:56 +0200)]
pgqd: set defaults for pidfile & logfile

14 years agocascade tag-dead: spread info over all nodes
Marko Kreen [Tue, 1 Feb 2011 12:55:29 +0000 (14:55 +0200)]
cascade tag-dead: spread info over all nodes

14 years agorefresh libusual
Marko Kreen [Tue, 1 Feb 2011 12:55:18 +0000 (14:55 +0200)]
refresh libusual

14 years agopsycopgwrapper: export psycopg2.Error as DBError
Marko Kreen [Tue, 1 Feb 2011 12:54:04 +0000 (14:54 +0200)]
psycopgwrapper: export psycopg2.Error as DBError

14 years agostatus: info improvements
Marko Kreen [Tue, 1 Feb 2011 12:25:46 +0000 (14:25 +0200)]
status: info improvements

- show queue name
- show local node
- show lag in nicer way
- show last tick on node

14 years agocascade status: catch node errors, instead of aborting
Marko Kreen [Tue, 1 Feb 2011 12:25:18 +0000 (14:25 +0200)]
cascade status: catch node errors, instead of aborting

14 years agopgq_node.get_node_info: set worker_last_tick to last tick on root.
Marko Kreen [Tue, 1 Feb 2011 12:23:52 +0000 (14:23 +0200)]
pgq_node.get_node_info: set worker_last_tick to last tick on root.

14 years agorefresh libusual
Marko Kreen [Thu, 27 Jan 2011 11:05:54 +0000 (13:05 +0200)]
refresh libusual

14 years agobump db ver
Marko Kreen [Thu, 27 Jan 2011 10:54:23 +0000 (12:54 +0200)]
bump db ver

14 years agoCascadedWorker: call pgq_node.set_global_watermark() only on branch
Marko Kreen [Wed, 26 Jan 2011 14:54:26 +0000 (16:54 +0200)]
CascadedWorker: call pgq_node.set_global_watermark() only on branch

14 years agodbscript: debug log for new connections
Marko Kreen [Mon, 24 Jan 2011 15:28:35 +0000 (17:28 +0200)]
dbscript: debug log for new connections

14 years agotodo: drop done items
Marko Kreen [Mon, 24 Jan 2011 15:28:18 +0000 (17:28 +0200)]
todo: drop done items

14 years agopgq/cascade/admin: make tag-dead store into db
Marko Kreen [Mon, 24 Jan 2011 15:26:27 +0000 (17:26 +0200)]
pgq/cascade/admin: make tag-dead store into db

14 years agopgq_node.drop_node.sql: on local drop, delete all locations
Marko Kreen [Mon, 24 Jan 2011 15:25:33 +0000 (17:25 +0200)]
pgq_node.drop_node.sql: on local drop, delete all locations