skytools.git
12 years agoUpdate NEWS
Marko Kreen [Thu, 29 Nov 2012 12:22:08 +0000 (14:22 +0200)]
Update NEWS

12 years agotests/londiste: testcase for weird merge
Marko Kreen [Thu, 29 Nov 2012 10:50:02 +0000 (12:50 +0200)]
tests/londiste: testcase for weird merge

12 years agoremove obsolete files
Marko Kreen [Thu, 29 Nov 2012 10:49:36 +0000 (12:49 +0200)]
remove obsolete files

12 years agoFew more syncer fixes
Marko Kreen [Wed, 28 Nov 2012 18:29:42 +0000 (20:29 +0200)]
Few more syncer fixes

12 years agoMerge remote-tracking branch 'martino/master'
Marko Kreen [Wed, 28 Nov 2012 18:16:30 +0000 (20:16 +0200)]
Merge remote-tracking branch 'martino/master'

Conflicts:
python/londiste/syncer.py

12 years agoMore tests for londiste
Marko Kreen [Wed, 28 Nov 2012 18:13:36 +0000 (20:13 +0200)]
More tests for londiste

12 years agolondiste regen.sh: don't run repair/compare quietly
Marko Kreen [Wed, 28 Nov 2012 18:13:10 +0000 (20:13 +0200)]
londiste regen.sh: don't run repair/compare quietly

12 years agoRework syncer code to search for data node
Marko Kreen [Wed, 28 Nov 2012 18:10:28 +0000 (20:10 +0200)]
Rework syncer code to search for data node

This makes them work with tables added with --find-copy-node.

Also, this disables consumer lag checking code as it makes
compare/repair too unreliable.  Probably it should be rewritten
and simple wait loop.

12 years agolondiste/syncer: spit out debug msgs when waiting too
martinko [Wed, 28 Nov 2012 16:32:01 +0000 (17:32 +0100)]
londiste/syncer: spit out debug msgs when waiting too

12 years agolondiste/syncer: throttle queries when waiting
martinko [Wed, 28 Nov 2012 16:25:57 +0000 (17:25 +0100)]
londiste/syncer: throttle queries when waiting

12 years agolondiste/syncer: do not spam with too many warnings
martinko [Wed, 28 Nov 2012 16:20:13 +0000 (17:20 +0100)]
londiste/syncer: do not spam with too many warnings

12 years agofixed typos
martinko [Wed, 28 Nov 2012 14:22:23 +0000 (15:22 +0100)]
fixed typos

12 years agotestlib.sh: use CASCADE when dropping table
Marko Kreen [Wed, 28 Nov 2012 10:32:46 +0000 (12:32 +0200)]
testlib.sh: use CASCADE when dropping table

12 years agoMerge remote-tracking branch 'sasha/master'
Marko Kreen [Wed, 28 Nov 2012 10:28:55 +0000 (12:28 +0200)]
Merge remote-tracking branch 'sasha/master'

- node-status

12 years agonode-status cleanup
Sasha Aliashkevich [Wed, 28 Nov 2012 10:37:27 +0000 (11:37 +0100)]
node-status cleanup

12 years agoMerge remote-tracking branch 'petr/master'
Marko Kreen [Tue, 27 Nov 2012 20:32:52 +0000 (22:32 +0200)]
Merge remote-tracking branch 'petr/master'

pgq.unregister + subconsumer behaviour fix

12 years agolondiste takeover: fix bug in loading events from other node
Marko Kreen [Tue, 27 Nov 2012 20:16:59 +0000 (22:16 +0200)]
londiste takeover: fix bug in loading events from other node

code forgot to remember the new most recent tick id

12 years agopgq.unregister_consumer: don't unregister all subconsumers in subscription when subco...
Petr Jelinek [Tue, 27 Nov 2012 20:16:33 +0000 (21:16 +0100)]
pgq.unregister_consumer: don't unregister all subconsumers in subscription when subconsumer was given on input

12 years agoLondiste: node-status command for local node
Sasha Aliashkevich [Mon, 26 Nov 2012 10:27:05 +0000 (11:27 +0100)]
Londiste: node-status command for local node

12 years agotakeover --dead-root: search for latest events on nodes
Marko Kreen [Fri, 23 Nov 2012 15:42:57 +0000 (17:42 +0200)]
takeover --dead-root: search for latest events on nodes

In case of several subscribers to root node, one of them may
be ahead of others.  Search over cascade for most-ahead
subscriber and load events to new root.

12 years agolondiste resurrect: Get dead root back into cascade
Marko Kreen [Thu, 22 Nov 2012 18:21:20 +0000 (20:21 +0200)]
londiste resurrect: Get dead root back into cascade

In some cases the 'takeover --dead-root' will be used although
actual data on node is fine.  Eg. network downtime, lost power.
It would be good to have a way to bring it back to cascade
without need for full rebuild.

This command sync queue contents and re-subscribes node.
Any events found on old root that are not spread to rest of cascade
are dumped and deleted.  No actual table changes are made,
thus there must be external mechanism to avoid data conflicts.

12 years agocascadeadmin: clean help text
Marko Kreen [Thu, 22 Nov 2012 13:30:25 +0000 (15:30 +0200)]
cascadeadmin: clean help text

12 years agodebian/skytools.ini: support launching pgqd and londiste3
Marko Kreen [Thu, 22 Nov 2012 12:45:59 +0000 (14:45 +0200)]
debian/skytools.ini: support launching pgqd and londiste3

No point requiring admins to config the same stuff.

12 years agoLondiste: auto-upgrade londiste schema
Marko Kreen [Wed, 7 Nov 2012 13:45:19 +0000 (15:45 +0200)]
Londiste: auto-upgrade londiste schema

12 years agoUpgrade script for Londiste - 2.1 to 3.1
Marko Kreen [Wed, 7 Nov 2012 13:05:26 +0000 (15:05 +0200)]
Upgrade script for Londiste - 2.1 to 3.1

12 years agosql/londiste: add alternative output for regtests for first run skytools_3_1_2
Marko Kreen [Fri, 2 Nov 2012 14:39:42 +0000 (16:39 +0200)]
sql/londiste: add alternative output for regtests for first run

Then will the groups created, which changes output.

12 years agoUpdate news with walmgr change, reorder by severity.
Marko Kreen [Fri, 2 Nov 2012 10:43:49 +0000 (12:43 +0200)]
Update news with walmgr change, reorder by severity.

12 years agoMerge remote-tracking branch 'intgit/master'
Marko Kreen [Fri, 2 Nov 2012 09:56:56 +0000 (11:56 +0200)]
Merge remote-tracking branch 'intgit/master'

12 years agov3.1.2
Marko Kreen [Fri, 2 Nov 2012 08:32:12 +0000 (10:32 +0200)]
v3.1.2

12 years agoRefresh libusual
Marko Kreen [Fri, 2 Nov 2012 09:35:12 +0000 (11:35 +0200)]
Refresh libusual

12 years agobumpver: just check if bump is needed
Marko Kreen [Fri, 2 Nov 2012 08:28:11 +0000 (10:28 +0200)]
bumpver: just check if bump is needed

12 years agogenpg: fetch version info automatically
Marko Kreen [Fri, 2 Nov 2012 08:27:31 +0000 (10:27 +0200)]
genpg: fetch version info automatically

12 years agofind_copy_source: also return downstream worker name
Marko Kreen [Thu, 1 Nov 2012 12:18:07 +0000 (14:18 +0200)]
find_copy_source: also return downstream worker name

12 years agopgq.LocalConsumer: improve docstrings.
Marko Kreen [Thu, 1 Nov 2012 11:35:13 +0000 (13:35 +0200)]
pgq.LocalConsumer: improve docstrings.

12 years agoLondiste: try to show exact event info on failure.
Marko Kreen [Thu, 1 Nov 2012 09:28:50 +0000 (11:28 +0200)]
Londiste: try to show exact event info on failure.

This should help debugging replication problems.

It does not work on first error, as we batch together a lot of SQL
statements, but on retry Londiste start replaying events one-by-one,
the the exact event can be spotted.

DBScript unnecessarily overrided emsg, drop that.

12 years agoBump pgq schema version to 3.1.2
Marko Kreen [Thu, 1 Nov 2012 09:27:49 +0000 (11:27 +0200)]
Bump pgq schema version to 3.1.2

12 years agopgq: quote internal table names
Marko Kreen [Thu, 1 Nov 2012 09:23:19 +0000 (11:23 +0200)]
pgq: quote internal table names

Quoting was not done previosly as the table names
come not from user input but from internal tables.

But understanding whether it's safe in particular setup requires
extra thinking which is not good.  So to remove the need for thinking,
lets quote everything properly.

12 years agoRename 2.1-to-3.0 upgrade script: pgq.upgrade_2.1_to_3.0.sql
Marko Kreen [Mon, 29 Oct 2012 14:02:19 +0000 (16:02 +0200)]
Rename 2.1-to-3.0 upgrade script: pgq.upgrade_2.1_to_3.0.sql

Hopefully this makes it more clear how to upgrade 2.1.

12 years agoqadmin: make "install pgq" also install pgq_coop
Marko Kreen [Tue, 30 Oct 2012 15:23:00 +0000 (17:23 +0200)]
qadmin: make "install pgq" also install pgq_coop

12 years agopgq: test upgrade from 2.1
Marko Kreen [Mon, 29 Oct 2012 12:12:43 +0000 (14:12 +0200)]
pgq: test upgrade from 2.1

12 years ago2to3 upgrade: Add DROP FUNCTION to work around param renaming.
Marko Kreen [Mon, 29 Oct 2012 12:01:18 +0000 (14:01 +0200)]
2to3 upgrade: Add DROP FUNCTION to work around param renaming.

Also stop generating the script, it's final now.

12 years agoMove -lsocket test to better place, simplify
Marko Kreen [Mon, 29 Oct 2012 12:00:56 +0000 (14:00 +0200)]
Move -lsocket test to better place, simplify

13 years agoremove a stray tab.
Martin Pihlak [Wed, 24 Oct 2012 11:25:38 +0000 (14:25 +0300)]
remove a stray tab.

13 years agoMove set_last_complete AFTER rsync.
Martin Pihlak [Wed, 24 Oct 2012 11:03:50 +0000 (14:03 +0300)]
Move set_last_complete AFTER rsync.

Previously .walshipping.last was updated before the rsync succeeded,
it turns out that this was too optimistic -- occasionally the rsync
fails and the .last file contains wrong information. This results
in skipped files during "master sync".

13 years agoskytools.scripting: added start-up time attribute
martinko [Fri, 19 Oct 2012 10:32:29 +0000 (12:32 +0200)]
skytools.scripting: added start-up time attribute

13 years agowhite noise
martinko [Fri, 19 Oct 2012 10:19:28 +0000 (12:19 +0200)]
white noise

13 years agoAdd londiste.exec_attrs to doctestable modules
Marko Kreen [Thu, 18 Oct 2012 13:00:51 +0000 (16:00 +0300)]
Add londiste.exec_attrs to doctestable modules

13 years agosetup_skytools: if -q is given, be quiet
Marko Kreen [Thu, 18 Oct 2012 10:41:34 +0000 (13:41 +0300)]
setup_skytools: if -q is given, be quiet

13 years agopart.py: avoid tab in code
Marko Kreen [Thu, 18 Oct 2012 10:39:48 +0000 (13:39 +0300)]
part.py: avoid tab in code

13 years agowalmgr: drop reference to traceback object
Marko Kreen [Thu, 18 Oct 2012 10:41:13 +0000 (13:41 +0300)]
walmgr: drop reference to traceback object

13 years agoCascadeAdmin: document wait-provider/wait-root commands
Marko Kreen [Thu, 18 Oct 2012 10:40:06 +0000 (13:40 +0300)]
CascadeAdmin: document wait-provider/wait-root commands

13 years agoMerge pull request #14 from beaglecode/get_working_in_smartos
Marko Kreen [Thu, 18 Oct 2012 12:20:49 +0000 (05:20 -0700)]
Merge pull request #14 from beaglecode/get_working_in_smartos

Add check to see if the socket library is required

13 years agoMerge pull request #15 from askoja/master
Marko Kreen [Thu, 18 Oct 2012 12:19:03 +0000 (05:19 -0700)]
Merge pull request #15 from askoja/master

Two more merge related tests

13 years agoTwo merge related tests created.
Asko Oja [Thu, 18 Oct 2012 10:23:54 +0000 (10:23 +0000)]
Two merge related tests created.

merge_all tests simple merge from two partitions into one target
          Also tests adding columns through cascade
merge_qnode tests same thing as merge all but uses also qnodes

13 years agoMove find-copy logic into separate module
Marko Kreen [Thu, 18 Oct 2012 08:28:00 +0000 (11:28 +0300)]
Move find-copy logic into separate module

13 years agoMove --find-copy-node logic to 'copy'
Marko Kreen [Thu, 18 Oct 2012 08:15:35 +0000 (11:15 +0300)]
Move --find-copy-node logic to 'copy'

This allows use of this switch also in merge situations,
where the node is different in each partition.

13 years agoFix compare expression - md5() was in wrong place
Marko Kreen [Thu, 18 Oct 2012 08:13:40 +0000 (11:13 +0300)]
Fix compare expression - md5() was in wrong place

13 years agolondiste execute: when ddl is already applied, restore db mode
Marko Kreen [Tue, 16 Oct 2012 11:51:12 +0000 (14:51 +0300)]
londiste execute: when ddl is already applied, restore db mode

When doing early exit, the code forgot to set proper mode.

13 years agolondiste: don't filter EXECUTE or TRUNCATE events
Marko Kreen [Tue, 16 Oct 2012 11:05:35 +0000 (14:05 +0300)]
londiste: don't filter EXECUTE or TRUNCATE events

They used to be filtered in merge nodes, but it does not
make sense anymore.

EXECUTE tracking is global now, not per-queue, thus filtering
is wrong now.

TRUNCATE does not seem to make sense in case of merged queue, but
filtering also does not make sense.  So let it pass down,
maybe there is scenariou where it is useful.

13 years agoAllow overrided options with --set to show up in --ini output
Marko Kreen [Tue, 16 Oct 2012 11:04:45 +0000 (14:04 +0300)]
Allow overrided options with --set to show up in --ini output

13 years agoAdd check to see if the socket library is required
Tony Arkles [Fri, 12 Oct 2012 04:16:33 +0000 (04:16 +0000)]
Add check to see if the socket library is required

This is necessary to get Skytools to build successfully on SmartOS, where you
have to explicitly add -lsocket when using socket calls.

13 years agocopy-cond: only dst handler condition is useful
Marko Kreen [Tue, 9 Oct 2012 19:43:10 +0000 (22:43 +0300)]
copy-cond: only dst handler condition is useful

13 years agoMerge pull request #13 from askoja/master
Marko Kreen [Tue, 9 Oct 2012 14:39:51 +0000 (07:39 -0700)]
Merge pull request #13 from askoja/master

Copy condition refactor

13 years agoMerge branch 'master' of https://github.com/markokr/skytools
Asko Oja [Tue, 9 Oct 2012 13:23:43 +0000 (13:23 +0000)]
Merge branch 'master' of https://github.com/markokr/skytools

13 years agov3.1.1 skytools_3_1_1
Marko Kreen [Tue, 9 Oct 2012 10:18:17 +0000 (13:18 +0300)]
v3.1.1

13 years agoAdd debian/copyright to tgz
Marko Kreen [Tue, 9 Oct 2012 10:34:34 +0000 (13:34 +0300)]
Add debian/copyright to tgz

13 years agoFix missed renames
Marko Kreen [Tue, 9 Oct 2012 10:25:08 +0000 (13:25 +0300)]
Fix missed renames

13 years agoMerge remote-tracking branch 'intgit/master'
Marko Kreen [Tue, 9 Oct 2012 08:48:30 +0000 (11:48 +0300)]
Merge remote-tracking branch 'intgit/master'

13 years ago--sync-watermark: don't allow subtree wm get above upstream wm
Marko Kreen [Tue, 9 Oct 2012 08:46:42 +0000 (11:46 +0300)]
--sync-watermark: don't allow subtree wm get above upstream wm

In case root is lagging, the subtree should not drop events.

13 years agoLondiste compare and repair fixes
Asko Oja [Mon, 8 Oct 2012 14:38:10 +0000 (14:38 +0000)]
Londiste compare and repair fixes

Deprecated Londiste command line parameter --copy-condition.
Londiste handler part.py must be used instead as it leaves
configuration in maintainable state.

Fixed Londiste compare and repair for one to many and
many to one repliaction use cases. Now filtering
condition is applied on both ends and datasets compared
should be the same.

Cleaned up database splitting howto.

13 years agoFix queue_splitter3 manpage.
Marko Kreen [Mon, 8 Oct 2012 07:21:20 +0000 (10:21 +0300)]
Fix queue_splitter3 manpage.

13 years agoNew syncer logic for non-root provider
Marko Kreen [Fri, 5 Oct 2012 19:18:04 +0000 (22:18 +0300)]
New syncer logic for non-root provider

Table-based locking is broken if provider is not root
as it blocks whole node.

Implement different logic for such case that pauses upstream
worker to get well-defined sync point.

13 years agoRemove bublin.py - its unmaintained
Marko Kreen [Fri, 5 Oct 2012 13:18:05 +0000 (16:18 +0300)]
Remove bublin.py - its unmaintained

It was supposed to support more elastic clustering,
but the effort has stalled, and the code is unfinished.

Remove it as it makes maintenance harder.

13 years agolondiste: add regtest alternatives for 8.3
Marko Kreen [Fri, 5 Oct 2012 12:16:16 +0000 (15:16 +0300)]
londiste: add regtest alternatives for 8.3

8.3 does not have TRUNCATE trigger, so tests
that expect it will fail.

13 years agolondiste.drop_table_triggers: use decode() instead cast
Marko Kreen [Fri, 5 Oct 2012 09:28:19 +0000 (12:28 +0300)]
londiste.drop_table_triggers: use decode() instead cast

text->bytea cast does not work on GP, use decode(val, 'escape')
to get same effect.

13 years agoMerge branch 'master' of skype-git:/git/dba/skytools-3
martinko [Thu, 4 Oct 2012 17:17:29 +0000 (19:17 +0200)]
Merge branch 'master' of skype-git:/git/dba/skytools-3

13 years agoskytools.scripting: speed up stat counters
martinko [Thu, 4 Oct 2012 13:02:11 +0000 (15:02 +0200)]
skytools.scripting: speed up stat counters

13 years agoSurvive empty PYTHON from PGXS
Marko Kreen [Wed, 3 Oct 2012 11:26:54 +0000 (14:26 +0300)]
Survive empty PYTHON from PGXS

13 years agoMerge pull request #12 from emiel/master
Marko Kreen [Wed, 3 Oct 2012 11:10:18 +0000 (04:10 -0700)]
Merge pull request #12 from emiel/master

Allow for building with different python versions

13 years agoFix support for '--with-python=PYTHON' configure flag
Emiel van de Laar [Tue, 2 Oct 2012 20:09:09 +0000 (22:09 +0200)]
Fix support for '--with-python=PYTHON' configure flag

13 years agosql: sync versions in all files
Marko Kreen [Fri, 28 Sep 2012 13:49:11 +0000 (16:49 +0300)]
sql: sync versions in all files

Seems there aretoo many places where version needs to be mentioned..

13 years agoRemove 'workaround' as it was pgq_coop own bug
Marko Kreen [Fri, 28 Sep 2012 13:20:53 +0000 (16:20 +0300)]
Remove 'workaround' as it was pgq_coop own bug

13 years agosql: always install contrib files
Marko Kreen [Fri, 28 Sep 2012 13:20:35 +0000 (16:20 +0300)]
sql: always install contrib files

13 years agocommon-pgxs: use awk instead sed when finding source files
Marko Kreen [Fri, 28 Sep 2012 12:44:15 +0000 (15:44 +0300)]
common-pgxs: use awk instead sed when finding source files

13 years agoMerge remote-tracking branch 'intgit/master'
Marko Kreen [Mon, 24 Sep 2012 13:48:30 +0000 (16:48 +0300)]
Merge remote-tracking branch 'intgit/master'

13 years agodraft news
Marko Kreen [Mon, 24 Sep 2012 13:46:27 +0000 (16:46 +0300)]
draft news

13 years agolondiste: bump schema version to 3.1.1
Marko Kreen [Mon, 24 Sep 2012 12:58:59 +0000 (15:58 +0300)]
londiste: bump schema version to 3.1.1

13 years agoRename queue_splitter & _mover docs with '3' suffix
Marko Kreen [Mon, 24 Sep 2012 12:54:04 +0000 (15:54 +0300)]
Rename queue_splitter & _mover docs with '3' suffix

It seems whole "configurable suffix" idea is a mess
and should be removed.

13 years agopgqd: Make connection handling more robust
Marko Kreen [Mon, 24 Sep 2012 09:41:47 +0000 (12:41 +0300)]
pgqd: Make connection handling more robust

There are reports of fatals() and stalls
when server goes down.  Plug potential holes.

* check for DB_CLOSED in tick_handler
* check for TUPLES_OK everywhere

13 years agoSupport for extensions upgrade
Marko Kreen [Wed, 19 Sep 2012 12:03:18 +0000 (15:03 +0300)]
Support for extensions upgrade

Needed for pgq & pgq_coop that have changed.

Also move more common code to common-pgxs.mk

13 years agoadjusted default keepalive_stats from 61 to 300 seconds
Asko Oja [Wed, 19 Sep 2012 12:42:34 +0000 (15:42 +0300)]
adjusted default keepalive_stats from 61 to 300 seconds

13 years agoAdded keepalive_stats parameter for consumer that controls how often idle consumer...
Asko Oja [Wed, 19 Sep 2012 11:59:00 +0000 (14:59 +0300)]
Added keepalive_stats parameter for consumer that controls how often idle consumer logs idle time. Also added rounding to milliseconds for logged durations

13 years agoRefresh libusual
Marko Kreen [Wed, 19 Sep 2012 09:47:50 +0000 (12:47 +0300)]
Refresh libusual

13 years agolondiste compare improvements
Marko Kreen [Tue, 18 Sep 2012 13:39:07 +0000 (16:39 +0300)]
londiste compare improvements

* Calculate common column names, to allow different order
  or different subset.
* Use different hash function on 8.3 <> something else comparision
  as hashtext() changed in 8.4.
* Always calculate final hash as bigint.

13 years agocompare workaroud for hashtext change between 8.3 and 8.4
Asko Oja [Tue, 18 Sep 2012 13:02:14 +0000 (16:02 +0300)]
compare workaroud for hashtext change between 8.3 and 8.4

13 years agopgq_coop.next_batch: check and create subconsumers after locking main consumer
Marko Kreen [Tue, 18 Sep 2012 11:37:25 +0000 (14:37 +0300)]
pgq_coop.next_batch: check and create subconsumers after locking main consumer

Otherwise, there is race with other consumers who might remove
just-checked subconsumer.

13 years agoconsumer logs again idle time spent waiting for events
Asko Oja [Tue, 18 Sep 2012 11:12:26 +0000 (14:12 +0300)]
consumer logs again idle time spent waiting for events

13 years agoMerge remote-tracking branch 'intgit/master'
Marko Kreen [Tue, 18 Sep 2012 11:10:04 +0000 (14:10 +0300)]
Merge remote-tracking branch 'intgit/master'

13 years agoChange londiste_create_part regtest to use specific fields
Marko Kreen [Tue, 18 Sep 2012 11:04:40 +0000 (14:04 +0300)]
Change londiste_create_part regtest to use specific fields

Otherwise test fails due to information_schema unstability.

13 years agolondiste.local_remove_table: resture DDL if still attached to table
Marko Kreen [Tue, 18 Sep 2012 10:40:45 +0000 (13:40 +0300)]
londiste.local_remove_table: resture DDL if still attached to table

Multi-TX COPY can happen on merge nodes.  If table
is removed during such copy, the DDL is removed from table
and put to 'dropped_ddl' column.

If dropped_ddl is not empty, the table is truncated and
DDL is restored.  Reason for truncate is that table is
unsynced anyway, so no point keeping the data.