Marko Kreen [Wed, 15 Apr 2009 17:36:01 +0000 (20:36 +0300)]
Refresh libusual
Martin Pihlak [Wed, 15 Apr 2009 13:58:53 +0000 (16:58 +0300)]
fix query output formatting.
Martin Pihlak [Wed, 15 Apr 2009 13:29:43 +0000 (16:29 +0300)]
Add ; to commands strings specified via -c
Martin Pihlak [Wed, 15 Apr 2009 12:53:12 +0000 (15:53 +0300)]
Allow queue name to be specified for register/unregister consumer.
Martin Pihlak [Tue, 14 Apr 2009 14:00:02 +0000 (17:00 +0300)]
Allow quoted queue and consumer names.
Martin Pihlak [Tue, 14 Apr 2009 10:19:44 +0000 (13:19 +0300)]
Merge branch 'master' of git://github.com/markokr/skytools-dev
Marko Kreen [Mon, 13 Apr 2009 20:19:51 +0000 (23:19 +0300)]
tests/londiste: reintroduce lost topo tests
Marko Kreen [Mon, 13 Apr 2009 18:17:29 +0000 (21:17 +0300)]
doc: move html cleaning to realclean
Marko Kreen [Mon, 13 Apr 2009 18:02:48 +0000 (21:02 +0300)]
tgz generation fixes
- include html files
- include scripts/*.ini
- include misc/*
- include *.ini under sql/
Marko Kreen [Mon, 13 Apr 2009 17:29:37 +0000 (20:29 +0300)]
Merge branch 'master' of git@github.com:markokr/skytools-dev
Marko Kreen [Mon, 13 Apr 2009 17:28:50 +0000 (20:28 +0300)]
last doc update
Marko Kreen [Mon, 13 Apr 2009 17:27:00 +0000 (20:27 +0300)]
Merge branch 'master' of git@github.com:markokr/skytools-dev
Marko Kreen [Mon, 13 Apr 2009 17:22:00 +0000 (20:22 +0300)]
pgq/triggers: remove double include
Both I and Martin added the builtins.h.
Marko Kreen [Mon, 13 Apr 2009 17:12:54 +0000 (20:12 +0300)]
tests/londiste: new tests
Marko Kreen [Mon, 13 Apr 2009 14:26:29 +0000 (17:26 +0300)]
sql/ticker: accept subsecond timeouts
also update it's todo
Marko Kreen [Mon, 13 Apr 2009 14:17:40 +0000 (17:17 +0300)]
Merge branch 'master' of git://github.com/markokr/skytools-dev
Marko Kreen [Mon, 13 Apr 2009 14:17:12 +0000 (17:17 +0300)]
tag tree as 3.0a1
Marko Kreen [Mon, 13 Apr 2009 14:15:51 +0000 (17:15 +0300)]
sql/ticker: make timeouts work
Marko Kreen [Mon, 13 Apr 2009 14:15:07 +0000 (17:15 +0300)]
source.cfg: include libusual in tgz
Marko Kreen [Mon, 13 Apr 2009 14:14:35 +0000 (17:14 +0300)]
configure.ac: Detect working gcc warning flags
Marko Kreen [Thu, 9 Apr 2009 13:58:07 +0000 (16:58 +0300)]
docs: more updates
New devnotes.txt to help developers.
Marko Kreen [Thu, 9 Apr 2009 09:25:09 +0000 (12:25 +0300)]
Import fixes from 2.1-stable.
- make skytools pkg depend on rsync
- missing headers in Postgres modules
- quoting for numeric ident
Marko Kreen [Mon, 13 Apr 2009 13:05:58 +0000 (16:05 +0300)]
top Makefile: instead of explicit targets, use subdir targets
Marko Kreen [Mon, 13 Apr 2009 13:05:18 +0000 (16:05 +0300)]
doc: update INSTALL on how to build from git
Marko Kreen [Mon, 13 Apr 2009 12:42:38 +0000 (15:42 +0300)]
sql/ticker: make pgqd compile & install without PGXS
PGXS used Postgres prefix, but we want executables to use
skytools prefix.
This needed also C compilation support from autoconf.
Lift it from pgbouncer.
Marko Kreen [Mon, 13 Apr 2009 11:35:34 +0000 (14:35 +0300)]
sql/ticker: Convert pgqd to libusual.
Thus it aquires:
- daemonization
- logging
- config file
- event loop without full libevent
Martin Pihlak [Mon, 13 Apr 2009 11:25:05 +0000 (14:25 +0300)]
added missing header file "access/xact.h"
Marko Kreen [Mon, 13 Apr 2009 10:05:31 +0000 (13:05 +0300)]
lib: Add libusual as subproject
Marko Kreen [Mon, 13 Apr 2009 10:03:08 +0000 (13:03 +0300)]
Merge commit 'martin/master'
Marko Kreen [Wed, 8 Apr 2009 16:40:44 +0000 (19:40 +0300)]
tests: move londiste test from cascade/ to londiste/
Marko Kreen [Wed, 8 Apr 2009 15:31:41 +0000 (18:31 +0300)]
Apply ISC license clarification
for f in `grep -rl 'and distribute' .`; do echo -e "%s;and distribute;and/or distribute;\nwq" | ed "$f"; done
More at: http://en.wikipedia.org/wiki/ISC_licence
Marko Kreen [Wed, 8 Apr 2009 15:27:30 +0000 (18:27 +0300)]
import docs from 2.1
Marko Kreen [Wed, 8 Apr 2009 13:13:38 +0000 (16:13 +0300)]
More doc updates for alpha
Marko Kreen [Wed, 8 Apr 2009 12:40:29 +0000 (15:40 +0300)]
sql/pgq_coop: Cooperative consuming
This module allows several consumers (subconsumers)
to share events between them so each subconsumers
sees only part of .
Implementation uses design described here:
http://lists.pgfoundry.org/pipermail/skytools-users/2008-July/000653.html
http://lists.pgfoundry.org/pipermail/skytools-users/2008-July/000671.html
Except instead <group>.<consumer> terminology <consumer>.<subconsumer>
is used. Having 'consumer' mean different things seemed confusing.
Implemented by Asko Tiidumaa
Martin Pihlak [Wed, 8 Apr 2009 15:37:45 +0000 (18:37 +0300)]
Separated queue pause from external ticker.
Martin Pihlak [Wed, 8 Apr 2009 15:06:46 +0000 (18:06 +0300)]
added missing header files.
Marko Kreen [Wed, 8 Apr 2009 13:03:56 +0000 (16:03 +0300)]
sql/pgq: allow sub_last_tick to be NULL (pgq_coop)
Marko Kreen [Wed, 8 Apr 2009 09:45:26 +0000 (12:45 +0300)]
sql/pgq: pgq.get_batch_cursor()
Helper function to fetch batch events using a cursor.
Marko Kreen [Wed, 8 Apr 2009 13:25:56 +0000 (16:25 +0300)]
sql/londiste: types.sql was removed
Martin Pihlak [Wed, 8 Apr 2009 13:30:54 +0000 (16:30 +0300)]
- add PQerrorMessage to conn_error()
- reconnect on db error and timeout
- getopt parentheses bugfix
Martin Pihlak [Wed, 8 Apr 2009 07:30:59 +0000 (10:30 +0300)]
Merge branch 'master' of git://github.com/markokr/skytools-dev
Marko Kreen [Tue, 7 Apr 2009 12:57:57 +0000 (15:57 +0300)]
Buildsystem update
- apply asciidoc/xmlto fixes from -stable
- make strip-ext default
- deb84 target
- reorder fields in setup.py
- email update
- install html docs under share/doc/skytools
- deb: build-dep on asciidoc+xmlto (temporarily?)
Marko Kreen [Tue, 7 Apr 2009 10:52:08 +0000 (13:52 +0300)]
sql/londiste: update regtest for fixed message
Marko Kreen [Tue, 7 Apr 2009 10:50:42 +0000 (13:50 +0300)]
sql/londiste: allow missing pkey in case of merged table.
Check if pkey is dropped by londiste itself.
Marko Kreen [Tue, 7 Apr 2009 10:38:22 +0000 (13:38 +0300)]
Fix copy filtering.
Adding filtering in case of sending events into combined queue
broke default copy-everything for plain cascading. Fix it by
adding addition argument to .copy_event() whether filtering
should be performed or not.
Martin Pihlak [Mon, 6 Apr 2009 09:39:29 +0000 (12:39 +0300)]
Merge branch 'master' of git://github.com/markokr/skytools-dev
Marko Kreen [Thu, 2 Apr 2009 13:46:18 +0000 (16:46 +0300)]
Various doc updates in preparation for alpha.
Marko Kreen [Wed, 18 Mar 2009 16:26:02 +0000 (18:26 +0200)]
sql/ticker: experimental multi-database ticker written in C
The new ticker is based on libevent, uses single-threaded
async architecture.
It can handle all databases in one Postgres instance, so you
need only one ticker instance per Postgres instance.
By default it autodetects all accessible databases and
whether they have PGQ installed.
Missing features ATM:
- logging
- config files
- daemonizing
- error handling
So it's not production quality yet..
Marko Kreen [Thu, 2 Apr 2009 10:34:39 +0000 (13:34 +0300)]
pgq: Ability to limit the number of events inserted by one TX
As PgQ can split batches only on transaction boundaries,
it does not tolerate huge number of events inserted by one TX.
This batch adds per-queue field queue_per_tx_limit, which can be
set to reasonable number and PgQ will enforce the limit, by throwing
error if event counts gets larger, thus rollbacking the problematic TX.
Such limit also adds possibility to survive UPDATE/DELETE statements,
where the WHERE clause is missing or buggy.
Marko Kreen [Thu, 2 Apr 2009 11:30:47 +0000 (14:30 +0300)]
sql/pgq: reindent C code
Several places had whitespace bugs, probably due to copy-paste.
As there is no point keeping historical PG style around here,
reindent with proper -kr -i8.
Martin Pihlak [Fri, 27 Mar 2009 14:54:52 +0000 (16:54 +0200)]
Implemented SHOW CONSUMER command.
Martin Pihlak [Fri, 20 Mar 2009 12:09:44 +0000 (14:09 +0200)]
- added pgq.set_queue_config function
- almost usable ALTER QUEUE
- simple feedback for non-show commands
Marko Kreen [Wed, 18 Mar 2009 09:07:31 +0000 (11:07 +0200)]
Preparation for pgq_coop: make sub_id non-unique.
To allow sharing retry events between coop consumers,
the simplest way is to make then share same sub_id.
So remove any assumptions from the code that
sub_id is unique.
This patch also fixes 2 long-standing bugs:
- pgq.retry_queue had double index
- pgq.subscription.batch_id did not had index
As both had only minor effect on performance, they went
unnoticed so long.
Marko Kreen [Fri, 13 Mar 2009 09:40:31 +0000 (11:40 +0200)]
newadm.txt: refresh and mention pending issues
Marko Kreen [Fri, 13 Mar 2009 09:39:47 +0000 (11:39 +0200)]
newadm: SHOW HELP
Marko Kreen [Wed, 11 Mar 2009 13:53:05 +0000 (15:53 +0200)]
newadm: more commands work now
- register
- unregister
- create queue
- drop queue
- show batch
- show queue
Marko Kreen [Mon, 9 Mar 2009 16:17:05 +0000 (18:17 +0200)]
experimental newadm code
Marko Kreen [Mon, 9 Mar 2009 07:03:16 +0000 (09:03 +0200)]
todo: update
Marko Kreen [Tue, 17 Feb 2009 12:22:58 +0000 (14:22 +0200)]
tests for combined queue_loader
Marko Kreen [Mon, 9 Mar 2009 06:59:03 +0000 (08:59 +0200)]
parsing.py: export sql_tokenizer, tag errors
Marko Kreen [Mon, 9 Mar 2009 06:58:14 +0000 (08:58 +0200)]
proper error message in pgq_code.create_node()
Marko Kreen [Mon, 9 Mar 2009 06:57:33 +0000 (08:57 +0200)]
psycopgwrapper: export connect_database()
Marko Kreen [Mon, 2 Mar 2009 09:09:07 +0000 (11:09 +0200)]
pgq: disable manual vacuuming if autovacuum works
Martin Pihlak [Fri, 6 Mar 2009 14:06:10 +0000 (16:06 +0200)]
log message fix.
Martin Pihlak [Fri, 6 Mar 2009 13:57:58 +0000 (15:57 +0200)]
add-table improvements.
Martin Pihlak [Fri, 6 Mar 2009 13:42:38 +0000 (15:42 +0200)]
add-seq improvements
Martin Pihlak [Thu, 5 Mar 2009 10:15:38 +0000 (12:15 +0200)]
- bring londiste.ini up to date
- bring londiste help message more up to date
- add --help hint for DBScript start error msg
- bump pgq version to 3.0devel
Martin Pihlak [Thu, 19 Feb 2009 10:20:29 +0000 (12:20 +0200)]
Merge branch 'master' of git://github.com/markokr/skytools-dev
Martin Pihlak [Wed, 18 Feb 2009 15:03:01 +0000 (23:03 +0800)]
Handle PostgreSQL configuration files as part of backup/restore.
New configuration variables for the config locations plus the
documentation changes.
Mark Kirkwoord, with some editorialization by me.
Signed-off-by: Marko Kreen <markokr@gmail.com>
Martin Pihlak [Wed, 18 Feb 2009 15:03:01 +0000 (17:03 +0200)]
Handle PostgreSQL configuration files as part of backup/restore.
New configuration variables for the config locations plus the
documentation changes.
Mark Kirkwoord, with some editorialization by me.
Martin Pihlak [Tue, 17 Feb 2009 15:16:54 +0000 (17:16 +0200)]
Merge branch 'master' of git://github.com/markokr/skytools-dev
Marko Kreen [Tue, 17 Feb 2009 15:10:33 +0000 (17:10 +0200)]
Combined queue_loader
Merge table_dispatcher, cube_dispatcher and bulk_loader together
Marko Kreen [Tue, 17 Feb 2009 11:16:27 +0000 (13:16 +0200)]
plainworker: process_remote_event takes cursors not dbs
Marko Kreen [Mon, 16 Feb 2009 17:55:39 +0000 (19:55 +0200)]
New UsageError exception class.
When thrown, the DBScript will just print the error message,
without traceback and any additional noise
To be used to show user simple error messages.
Can be used to build own Exception classes.
Marko Kreen [Mon, 16 Feb 2009 17:12:28 +0000 (19:12 +0200)]
Add skytools.exists_temp_table() to test if temp table exists.
Marko Kreen [Tue, 17 Feb 2009 15:00:53 +0000 (17:00 +0200)]
CascadeAdmin: check if --provider is set
This needs to be tested early or rather confusing
error messages will appear.
Martin Pihlak [Tue, 17 Feb 2009 14:50:13 +0000 (16:50 +0200)]
Merge branch 'master' of git://github.com/markokr/skytools-dev
Martin Pihlak [Tue, 17 Feb 2009 09:03:56 +0000 (17:03 +0800)]
test fixes.
Signed-off-by: Marko Kreen <markokr@gmail.com>
Martin Pihlak [Tue, 17 Feb 2009 09:03:56 +0000 (11:03 +0200)]
test fixes.
Marko Kreen [Mon, 16 Feb 2009 13:15:17 +0000 (15:15 +0200)]
test installed code not code in source dir
Marko Kreen [Mon, 16 Feb 2009 13:10:08 +0000 (15:10 +0200)]
build fixes:
- install pgq.cascade package
- use proper date format in debian/changelog
Marko Kreen [Fri, 13 Feb 2009 15:13:59 +0000 (17:13 +0200)]
remove obsolete files
Marko Kreen [Fri, 13 Feb 2009 11:46:37 +0000 (13:46 +0200)]
Various doc updates.
Marko Kreen [Fri, 13 Feb 2009 12:21:09 +0000 (14:21 +0200)]
build system update
- make check target to use pychecker on codebase
- configure switch to install user-runnable python
scripts without .py extension
- reset debian/changelog
- deb: drop psycopg1, pg8.0, pg8.1
Marko Kreen [Fri, 13 Feb 2009 11:57:58 +0000 (13:57 +0200)]
scripts/ update, mostly from 2.1-stable
Some docsrting updates also.
Dispatchers have not upgraded for cascading yet.
Marko Kreen [Fri, 13 Feb 2009 11:43:01 +0000 (13:43 +0200)]
new tests for cascading
Marko Kreen [Fri, 13 Feb 2009 11:14:37 +0000 (13:14 +0200)]
python/londiste rewrite for cascading
New features:
- Cascading
- 'execute' command for running SQL scripts on nodes
- Parallel COPY
- Partition merge
- Sequences are pushed from root
- Rename 'add' command to 'add-table'
- --create switch to add-seq / add-table
also drop the never-implemented file-based transport classes.
Marko Kreen [Fri, 13 Feb 2009 12:16:59 +0000 (14:16 +0200)]
python/pgq update
- remove the obsolete setconsumer stuff
- New CascadedConsumer / CascadedWorker classes,
that are based on regular pgq.Consumer
- move RemoteConsumer / SerialConsumer out of pgq/consumer.py
pgq.Consumer:
- rename conf params and instance variables:
pgq_queue_name -> queue_name
pgq_consumer_id -> consumer_name
- disable automatic registration on the queue,
now script needs to be called with switches --register / --unregister
- drop code to read from multiple-queues at once
pgq.ticker:
- drop event seq tracking code, this is now done in db
Marko Kreen [Fri, 13 Feb 2009 10:49:38 +0000 (12:49 +0200)]
Rewrite sql/londiste for cascading.
Noteworthy changes:
- EXECUTE
- Parallel copy from partitions into single table.
- Sequences are now pushed, instead of pulled.
Root node will periodically send values with reasonable
safety-room into queue.
Marko Kreen [Fri, 13 Feb 2009 10:46:44 +0000 (12:46 +0200)]
Rewrite sql/pgq_set as sql/pgq_node
Main change is that there is no 'set' concept anymore.
Everything is queue-based.
Marko Kreen [Fri, 13 Feb 2009 10:29:12 +0000 (12:29 +0200)]
sql/pgq update
structure:
- event_seq field for pgq.tick table, to store last value
from event_id_seq
- 'disabled' field for pgq.queue, which can disable any
direct inserts to queue. inserts are allowed only
if session_role = 'replica'
functions:
- pgq.next_batch_info() as next_batch() but returns full details
- pgq.ticker(): now contains ticker logic that previously
was located in python code - it uses the event_seq field
in tick table to know about last sequence value
- pgq.insert_event_raw() - check disabled flag
- pgq.seq_getval() / pgq.seq_setval() functions for safe
sequence variable manipulation
- remove denytriga, now regular triggers can play the role
- use OUT parameters instead of ret types
- pgq.force_tick(): silently ignore the request on disabled queues
- pgq.maint_retry_events(): fwd port bugfix from 2.1-stable
- pgq.maint_rotate_tables(): cleanup from 2.1-stable
- pgq.maint_tables_to_vacuum(): add more tables
- triggers/common.c: bugfix from 2.1-stable
Marko Kreen [Fri, 13 Feb 2009 10:03:53 +0000 (12:03 +0200)]
python/skytools update
- docstrings
- some preliminary python 3.0 compat (var names, print())
- sync with 2.1-stable
adminscript:
- move exec_cmd function to dbscript
dbstruct:
- support sequnces. SERIAL columns are not automatically created,
but the link beteween column and sequence is.
psycopgwrapper:
- drop support for psycopg1
- beginnings of quick DB-API / DictRow description.
quoting:
- new unquote_fqident() function, reverse of quote_fqident()
- quote_statement() accepts both row and dict
dbscript:
- catch startup errors
- use log.exception for exceptions, will result in nicer logs
sqltools:
- exists_sequence()
_pyquoting:
- fix typo in variable name
Marko Kreen [Thu, 12 Feb 2009 14:41:38 +0000 (16:41 +0200)]
tag the tree as 3.0-git
Martin Pihlak [Fri, 30 Jan 2009 12:36:55 +0000 (12:36 +0000)]
If possible, use %r in restore_command. Based on patch by
Mark Kirkwood and Omar Kilani.
Martin Pihlak [Mon, 26 Jan 2009 21:33:42 +0000 (21:33 +0000)]
fix a crash in master_stop if pidfile not present in config file.
from Mark Kirkwood.
Martin Pihlak [Mon, 26 Jan 2009 13:51:46 +0000 (13:51 +0000)]
- documentation update.
- upgraded configuration to use 8.3
Martin Pihlak [Thu, 22 Jan 2009 18:25:41 +0000 (18:25 +0000)]
bugfix for archive_mode detection.
Martin Pihlak [Thu, 22 Jan 2009 17:46:27 +0000 (17:46 +0000)]
- improved archive_mode handling, loosely based on patch by Mark Kirkwood
- replaced os.system with exec_system, that pays attention to 'not_really'
- separate class for the configuration modifier
Marko Kreen [Thu, 8 Jan 2009 20:14:16 +0000 (20:14 +0000)]
skytools.DBScript: better pidfile handling (from 2.2)
Marko Kreen [Thu, 8 Jan 2009 20:09:05 +0000 (20:09 +0000)]
skytools.full_copy(): quoting, copy_expert (from 2.2)