skytools.git
12 years agoMerge branch 'master' of https://github.com/markokr/skytools
Tarvi Pillessaar [Tue, 5 Mar 2013 14:02:46 +0000 (16:02 +0200)]
Merge branch 'master' of https://github.com/markokr/skytools

12 years agoMerge remote-tracking branch 'gamato/master'
Marko Kreen [Tue, 5 Mar 2013 13:34:49 +0000 (15:34 +0200)]
Merge remote-tracking branch 'gamato/master'

12 years agonewgrants/pgq_node: another fix
Marko Kreen [Tue, 5 Mar 2013 13:31:35 +0000 (15:31 +0200)]
newgrants/pgq_node: another fix

12 years agoMerge branch 'master' of https://github.com/markokr/skytools
martinko [Tue, 5 Mar 2013 13:26:14 +0000 (14:26 +0100)]
Merge branch 'master' of https://github.com/markokr/skytools

12 years agodocs
martinko [Tue, 5 Mar 2013 13:25:50 +0000 (14:25 +0100)]
docs

12 years agowalmgr: small loglevel changes
Tarvi Pillessaar [Tue, 5 Mar 2013 07:44:08 +0000 (09:44 +0200)]
walmgr: small loglevel changes

12 years agodata_maintainer: better way to handle .looping and .loop_delay
Marko Kreen [Mon, 4 Mar 2013 13:37:13 +0000 (15:37 +0200)]
data_maintainer: better way to handle .looping and .loop_delay

12 years agoloop_delay: let class variable set default
Marko Kreen [Mon, 4 Mar 2013 12:55:36 +0000 (14:55 +0200)]
loop_delay: let class variable set default

This way it's easier to change default in subclass.

12 years agoMerge branch 'master' of https://github.com/markokr/skytools
martinko [Mon, 4 Mar 2013 09:55:03 +0000 (10:55 +0100)]
Merge branch 'master' of https://github.com/markokr/skytools

12 years agoscripts/data_maintainer.py: fixes
martinko [Mon, 4 Mar 2013 09:48:02 +0000 (10:48 +0100)]
scripts/data_maintainer.py: fixes

12 years agoMerge remote-tracking branch 'petr/master'
Marko Kreen [Mon, 4 Mar 2013 09:35:06 +0000 (11:35 +0200)]
Merge remote-tracking branch 'petr/master'

12 years agoRevert "setup_skytools: install grant files under /usr/share/skytools"
Marko Kreen [Mon, 4 Mar 2013 09:33:09 +0000 (11:33 +0200)]
Revert "setup_skytools: install grant files under /usr/share/skytools"

This reverts commit c63236f11753c06a10dee125f2dc1cd241e92714.

setup_skytools.py wants ability to regenerate the fixes in pure-Python,
which is pain for grant files.  Will look into it later.

12 years agoMore newgrants fixes..
Marko Kreen [Mon, 4 Mar 2013 09:23:29 +0000 (11:23 +0200)]
More newgrants fixes..

12 years agolondiste: actually execute the ENABLE/DISABLE RULE query in londiste.create_partition
Petr Jelinek [Sun, 3 Mar 2013 23:58:55 +0000 (00:58 +0100)]
londiste: actually execute the ENABLE/DISABLE RULE query in londiste.create_partition

12 years agocascadeadmin status: wait for threads
Marko Kreen [Sun, 3 Mar 2013 19:00:50 +0000 (21:00 +0200)]
cascadeadmin status: wait for threads

Instead Queue.join(), call Thread.join() for each
thread.  Otherwise the thread can be active during
process shutdown and throw weird errors.

After that, calling Queue.join() seems useless; it can
even allow additional failure situations.

Also clarify thread count logic.

12 years agomore newgrants fixes.
Marko Kreen [Sun, 3 Mar 2013 18:53:21 +0000 (20:53 +0200)]
more newgrants fixes.

mostly works now.

only problem is that londiste_writer needs to be
superuser because of session_replication_role.
That can be fixed with secdef function, but that
means code needs to be installed separately.

12 years agosetup_skytools: install grant files under /usr/share/skytools
Marko Kreen [Sun, 3 Mar 2013 18:52:05 +0000 (20:52 +0200)]
setup_skytools: install grant files under /usr/share/skytools

12 years agocreate-node: validate, accept public location from config
Marko Kreen [Fri, 1 Mar 2013 21:35:00 +0000 (23:35 +0200)]
create-node: validate, accept public location from config

12 years agoconfigure.ac: check for -lrt
Marko Kreen [Fri, 1 Mar 2013 21:33:23 +0000 (23:33 +0200)]
configure.ac: check for -lrt

Needed when pgqd is built against libevent (--with-libevent)

12 years agoParse & merge Postgres connect strings
Marko Kreen [Fri, 1 Mar 2013 21:02:18 +0000 (23:02 +0200)]
Parse & merge Postgres connect strings

12 years agoscripts: sweeping change to postpone log string formatting
martinko [Thu, 28 Feb 2013 14:14:43 +0000 (15:14 +0100)]
scripts: sweeping change to postpone log string formatting

12 years agosetup_skytools.py: added data_maintainer.py
martinko [Thu, 28 Feb 2013 14:14:03 +0000 (15:14 +0100)]
setup_skytools.py: added data_maintainer.py

12 years agoscripts/data_maintainer.py: updated
martinko [Thu, 28 Feb 2013 14:03:42 +0000 (15:03 +0100)]
scripts/data_maintainer.py: updated

12 years agoscripts/data_maintainer.py: imported from skytools 2.0
martinko [Thu, 28 Feb 2013 14:02:07 +0000 (15:02 +0100)]
scripts/data_maintainer.py: imported from skytools 2.0

12 years agoMerge branch 'master' of https://github.com/markokr/skytools
martinko [Wed, 27 Feb 2013 15:54:17 +0000 (16:54 +0100)]
Merge branch 'master' of https://github.com/markokr/skytools

12 years agoMerge branch 'master' of https://github.com/markokr/skytools
martinko [Wed, 27 Feb 2013 15:52:36 +0000 (16:52 +0100)]
Merge branch 'master' of https://github.com/markokr/skytools

12 years agoMerge remote-tracking branch 'gamato/master'
Marko Kreen [Wed, 27 Feb 2013 15:48:30 +0000 (17:48 +0200)]
Merge remote-tracking branch 'gamato/master'

12 years agoscripts: fixed shebang line
martinko [Wed, 27 Feb 2013 13:50:35 +0000 (14:50 +0100)]
scripts: fixed shebang line

12 years agopgq.cascade.admin: amended threading
martinko [Wed, 27 Feb 2013 13:23:22 +0000 (14:23 +0100)]
pgq.cascade.admin: amended threading

12 years agothread safety catchup
martinko [Wed, 27 Feb 2013 11:18:18 +0000 (12:18 +0100)]
thread safety catchup

12 years agopgq/cascade: significant speed up of getting status on big cascades
martinko [Wed, 27 Feb 2013 09:44:55 +0000 (10:44 +0100)]
pgq/cascade: significant speed up of getting status on big cascades

e.g.: 1000 node cascade status went from minutes to seconds

12 years agoMerge remote-tracking branch 'gamato/master'
Marko Kreen [Sat, 23 Feb 2013 13:17:00 +0000 (15:17 +0200)]
Merge remote-tracking branch 'gamato/master'

12 years agowalmgr: sweeping change to postpone log string formatting
martinko [Sat, 23 Feb 2013 08:11:16 +0000 (09:11 +0100)]
walmgr: sweeping change to postpone log string formatting

12 years agoMerge remote-tracking branch 'gamato/master'
Marko Kreen [Fri, 22 Feb 2013 15:08:44 +0000 (17:08 +0200)]
Merge remote-tracking branch 'gamato/master'

12 years agonoise
martinko [Fri, 22 Feb 2013 13:29:44 +0000 (14:29 +0100)]
noise

12 years agopgq: sweeping change to postpone log string formatting
martinko [Fri, 22 Feb 2013 13:28:56 +0000 (14:28 +0100)]
pgq: sweeping change to postpone log string formatting

12 years agolondiste: sweeping change to postpone log string formatting
martinko [Thu, 21 Feb 2013 15:09:47 +0000 (16:09 +0100)]
londiste: sweeping change to postpone log string formatting

12 years agolondiste: moved drop_obsolete_partitions() call to check_part()
martinko [Thu, 21 Feb 2013 14:17:46 +0000 (15:17 +0100)]
londiste: moved drop_obsolete_partitions() call to check_part()

Note that current behaviour is that dispatcher would crash if events older than retention period arrived.
Perhaps it is better than quietly recreating and redropping tables for too old events..?

12 years agolondiste.drop_obsolete_partitions: changed back to return (and log) names of dropped...
martinko [Thu, 21 Feb 2013 14:07:01 +0000 (15:07 +0100)]
londiste.drop_obsolete_partitions: changed back to return (and log) names of dropped tables

12 years agolondiste.create_partition: properly quote owner in ddl
martinko [Thu, 21 Feb 2013 12:44:00 +0000 (13:44 +0100)]
londiste.create_partition: properly quote owner in ddl

12 years agolondiste.drop_obsolete_partitions: reformatted
martinko [Thu, 21 Feb 2013 12:36:01 +0000 (13:36 +0100)]
londiste.drop_obsolete_partitions: reformatted

12 years agokwcheck.py: compare postgres keywords table
Marko Kreen [Wed, 20 Feb 2013 20:23:43 +0000 (22:23 +0200)]
kwcheck.py: compare postgres keywords table

12 years agoskytools.quoting: add more keywords
Marko Kreen [Wed, 20 Feb 2013 20:21:20 +0000 (22:21 +0200)]
skytools.quoting: add more keywords

Automatically compare pg-git kwlist.h with our list.

New words:

  cross current_catalog current_schema fetch freeze
  full ilike inner is isnull join lateral left like
  natural notnull outer over overlaps right similar
  variadic verbose window with

12 years agoMerge pull request #23 from reinteractive-open/146bdc280056fcc4cd9bc0385601f03c8c62e01d
Marko Kreen [Wed, 20 Feb 2013 19:30:27 +0000 (11:30 -0800)]
Merge pull request #23 from reinteractive-open/146bdc280056fcc4cd9bc0385601f03c8c62e01d

adding 'authorizations' as a keyword

12 years agomake debclean: make it less broken
Marko Kreen [Wed, 20 Feb 2013 18:43:36 +0000 (20:43 +0200)]
make debclean: make it less broken

seems it has not been used for a long time.

12 years agolondiste.create_trigger: use decode for _new_args[1]
Marko Kreen [Wed, 20 Feb 2013 18:38:49 +0000 (20:38 +0200)]
londiste.create_trigger: use decode for _new_args[1]

12 years agoMerge remote-tracking branch 'petr/master'
Marko Kreen [Wed, 20 Feb 2013 18:36:27 +0000 (20:36 +0200)]
Merge remote-tracking branch 'petr/master'

12 years agolondiste: added dispatch handler arg retention_period
martinko [Wed, 20 Feb 2013 16:10:55 +0000 (17:10 +0100)]
londiste: added dispatch handler arg retention_period

It controls how long to keep partitions around. Examples: '3 months', '1 year'

12 years agonoise
martinko [Wed, 20 Feb 2013 16:07:04 +0000 (17:07 +0100)]
noise

12 years agolondiste.drop_obsolete_partitions: changed to raise notice instead of returning rows...
martinko [Tue, 19 Feb 2013 19:55:23 +0000 (20:55 +0100)]
londiste.drop_obsolete_partitions: changed to raise notice instead of returning rows; defaults to public schema.

12 years agolondiste.drop_obsolete_partitions: amended
martinko [Tue, 19 Feb 2013 18:46:19 +0000 (19:46 +0100)]
londiste.drop_obsolete_partitions: amended

12 years agolondiste.drop_obsolete_partitions: added support for different partitioning periods
martinko [Tue, 19 Feb 2013 18:44:09 +0000 (19:44 +0100)]
londiste.drop_obsolete_partitions: added support for different partitioning periods

12 years agolondiste: reformatted drop_obsolete_partitions() to lower case
martinko [Tue, 19 Feb 2013 18:42:10 +0000 (19:42 +0100)]
londiste: reformatted drop_obsolete_partitions() to lower case

12 years agolondiste: imported drop_obsolete_partitions(2) function
martinko [Tue, 19 Feb 2013 18:40:20 +0000 (19:40 +0100)]
londiste: imported drop_obsolete_partitions(2) function

12 years agolondiste: create_partition now sets owner to match parent table
martinko [Fri, 15 Feb 2013 12:47:08 +0000 (13:47 +0100)]
londiste: create_partition now sets owner to match parent table

12 years agodoc/londiste3: catch up with recent "compare --count-only" commit
martinko [Fri, 15 Feb 2013 12:03:16 +0000 (13:03 +0100)]
doc/londiste3: catch up with recent "compare --count-only" commit

12 years agoMerge remote-tracking branch 'tarvip/master'
Marko Kreen [Thu, 14 Feb 2013 14:37:39 +0000 (16:37 +0200)]
Merge remote-tracking branch 'tarvip/master'

12 years agoadded handling deletes to keep_latest row_mode
Eero Oja [Wed, 13 Feb 2013 15:23:25 +0000 (15:23 +0000)]
added handling deletes to keep_latest row_mode

12 years agonoise
martinko [Wed, 13 Feb 2013 09:42:35 +0000 (10:42 +0100)]
noise

12 years agolondiste: added --count-only to compare command
martinko [Tue, 12 Feb 2013 07:37:04 +0000 (08:37 +0100)]
londiste: added --count-only to compare command

For quickly checking whether tables have same number of rows,
without comparing tables' contents (data).

12 years agolondiste: quote queue name in trigger args
Petr Jelinek [Sat, 9 Feb 2013 00:16:36 +0000 (01:16 +0100)]
londiste: quote queue name in trigger args

12 years agolondiste newgrants: update group names
Marko Kreen [Tue, 29 Jan 2013 14:02:26 +0000 (16:02 +0200)]
londiste newgrants: update group names

12 years agoscriptmgr: fix copy-paste error in full_path
Marko Kreen [Tue, 29 Jan 2013 14:00:59 +0000 (16:00 +0200)]
scriptmgr: fix copy-paste error in full_path

12 years agoPGQ: same bug different place...
Petr Jelinek [Mon, 28 Jan 2013 12:53:31 +0000 (13:53 +0100)]
PGQ: same bug different place...

12 years agoPgq: fix RetriableBatchWalker initialization
Petr Jelinek [Mon, 28 Jan 2013 11:42:40 +0000 (12:42 +0100)]
Pgq: fix RetriableBatchWalker initialization

12 years agoskytools_upgrae: make force option work properly
Tarvi Pillessaar [Fri, 25 Jan 2013 12:22:05 +0000 (14:22 +0200)]
skytools_upgrae: make force option work properly

12 years agoRemove typo in Event
Petr Jelinek [Fri, 25 Jan 2013 09:27:56 +0000 (10:27 +0100)]
Remove typo in Event

12 years agoskytools.Config: fix the case if filename is missing
Tarvi Pillessaar [Fri, 25 Jan 2013 08:31:18 +0000 (10:31 +0200)]
skytools.Config: fix the case if filename is missing

12 years agoInitialize Event properly in BaseConsumer
Petr Jelinek [Thu, 24 Jan 2013 13:04:31 +0000 (14:04 +0100)]
Initialize Event properly in BaseConsumer

12 years agoskytools_upgrade: add force option
Tarvi Pillessaar [Wed, 23 Jan 2013 10:25:51 +0000 (12:25 +0200)]
skytools_upgrade: add force option

12 years agoscriptmgr: give -nH args to sudo
Marko Kreen [Mon, 21 Jan 2013 17:54:23 +0000 (19:54 +0200)]
scriptmgr: give -nH args to sudo

12 years agoscriptmgr: fix ~ expansion
Marko Kreen [Sun, 20 Jan 2013 20:55:13 +0000 (22:55 +0200)]
scriptmgr: fix ~ expansion

12 years agoMerge remote-tracking branch 'petr/master'
Marko Kreen [Fri, 18 Jan 2013 21:34:24 +0000 (23:34 +0200)]
Merge remote-tracking branch 'petr/master'

12 years agoscriptmgr: user= support
Marko Kreen [Wed, 16 Jan 2013 23:52:43 +0000 (01:52 +0200)]
scriptmgr: user= support

Daemon sections can now have user= option.  It makes
scriptmgr launch (and kill) daemons with sudo -u $user.

12 years agoRegression test for previous commit
Petr Jelinek [Thu, 17 Jan 2013 13:33:54 +0000 (14:33 +0100)]
Regression test for previous commit

12 years agoLondiste: fix trigger generation when extra params that are add-table specific are...
Petr Jelinek [Thu, 17 Jan 2013 13:11:07 +0000 (14:11 +0100)]
Londiste: fix trigger generation when extra params that are add-table specific are used (introduced in commit 364ade9)

12 years agoAdded pg keyword 'authorization'
Glenn Davy [Tue, 15 Jan 2013 23:07:06 +0000 (10:07 +1100)]
Added pg keyword 'authorization'

12 years agoMerge remote-tracking branch 'petr/master'
Marko Kreen [Mon, 14 Jan 2013 19:04:00 +0000 (21:04 +0200)]
Merge remote-tracking branch 'petr/master'

12 years agoLondiste: make compare 8.2 compatible
Petr Jelinek [Mon, 14 Jan 2013 17:20:42 +0000 (18:20 +0100)]
Londiste: make compare 8.2 compatible

12 years agoMerge branch 'master' of https://github.com/markokr/skytools
martinko [Mon, 14 Jan 2013 15:05:01 +0000 (16:05 +0100)]
Merge branch 'master' of https://github.com/markokr/skytools

12 years agolondiste.handler: disable shortcut for specifying handler args together with its...
martinko [Mon, 14 Jan 2013 15:04:22 +0000 (16:04 +0100)]
londiste.handler: disable shortcut for specifying handler args together with its name

This will be allowed no more:  --handler="hname(arg1=123, …)"
It was a weak point through which Londiste setup could be broken.

12 years agoskytools.Config: New default variables.
Marko Kreen [Mon, 14 Jan 2013 14:09:23 +0000 (16:09 +0200)]
skytools.Config: New default variables.

config_dir - directory where config is located at
config_file - config file itself.

12 years agoRemove: pgqadm and related code, its unmaintained
Marko Kreen [Mon, 14 Jan 2013 12:30:21 +0000 (14:30 +0200)]
Remove: pgqadm and related code, its unmaintained

Although it was nice to have Python code that shows
how PgQ ticker and maintenance operations should work,
if it's unmaintaned, it's pointless.

12 years agoMerge pull request #20 from kitsemets/master
Marko Kreen [Mon, 14 Jan 2013 11:51:24 +0000 (03:51 -0800)]
Merge pull request #20 from kitsemets/master

londiste3 add-table option --copy-condition removed from man page

12 years agoBaseScript: skylog_locations config options
Marko Kreen [Mon, 14 Jan 2013 11:50:16 +0000 (13:50 +0200)]
BaseScript: skylog_locations config options

This allows to specify per-script skylog.ini

12 years agocopy-condition removed from londiste3 man page
Kaarel Kitsemets [Mon, 14 Jan 2013 10:34:19 +0000 (12:34 +0200)]
copy-condition removed from londiste3 man page

This option is no longer available as londiste3 add-table option.
Removed in ccfcf87df7fe0a123b563efec1639dec8367c2da

12 years agopgq.event: __slots__ cleanup
Marko Kreen [Mon, 14 Jan 2013 09:36:23 +0000 (11:36 +0200)]
pgq.event: __slots__ cleanup

12 years agoMerge remote-tracking branch 'petr/consumer_refactor'
Marko Kreen [Mon, 14 Jan 2013 09:34:42 +0000 (11:34 +0200)]
Merge remote-tracking branch 'petr/consumer_refactor'

12 years agoMove more of retry logic away from BaseConsumer/Event classes
Petr Jelinek [Fri, 11 Jan 2013 18:40:11 +0000 (19:40 +0100)]
Move more of retry logic away from BaseConsumer/Event classes

12 years agoStore naturaldocs customizations in tree.
Marko Kreen [Thu, 10 Jan 2013 21:08:33 +0000 (23:08 +0200)]
Store naturaldocs customizations in tree.

Now unpatched naturaldocs should work fine.

12 years agoFix basescript docstring
Marko Kreen [Thu, 10 Jan 2013 20:27:07 +0000 (22:27 +0200)]
Fix basescript docstring

12 years agoCascadedConsumer is now also subclass of BaseConsumer (does not allow retry)
Petr Jelinek [Wed, 9 Jan 2013 09:02:34 +0000 (10:02 +0100)]
CascadedConsumer is now also subclass of BaseConsumer (does not allow retry)

12 years agoMerge branch 'master' of skype-git:/git/dba/skytools-3
martinko [Tue, 8 Jan 2013 16:20:13 +0000 (17:20 +0100)]
Merge branch 'master' of skype-git:/git/dba/skytools-3

12 years agoRefactor Consumer code.
Petr Jelinek [Tue, 8 Jan 2013 14:31:34 +0000 (15:31 +0100)]
Refactor Consumer code.

    Common code from pgq.Consumer goes into new pgq.BaseConsumer, pgq.Consumer and pgq.LocalConsumer are now subclasses of pgq.BaseConsumer and pgq.Consumer adds retry api/logic.
    pgq.Event code is now split between pgq.Event and pgq.RetriableEvent.
    These changes reflect the fact that pgq.LocalConsumer should not be allowed to use retry logic.

12 years agolondiste/handlers/dispatch: undocumented parent table cloning
martinko [Tue, 8 Jan 2013 09:38:36 +0000 (10:38 +0100)]
londiste/handlers/dispatch: undocumented parent table cloning

12 years agoMerge remote-tracking branch 'gamato/master'
Marko Kreen [Mon, 7 Jan 2013 16:46:39 +0000 (18:46 +0200)]
Merge remote-tracking branch 'gamato/master'

12 years agolondiste/handlers/dispatch: fixed issue with missing part_func description
martinko [Mon, 7 Jan 2013 15:32:39 +0000 (16:32 +0100)]
londiste/handlers/dispatch: fixed issue with missing part_func description

Fixes the following issue with Dispatcher based handlers:
ValueError: Invalid handler argument: ['part_func']

12 years agodebian: simplify more
Marko Kreen [Sat, 5 Jan 2013 11:30:13 +0000 (13:30 +0200)]
debian: simplify more

* don't track sql files one-by-one
* remove genpg.sh
* remove local pg_buildext

12 years agodeb cleanup
Marko Kreen [Fri, 4 Jan 2013 08:55:33 +0000 (10:55 +0200)]
deb cleanup

* use installed pg_buildext
* use installed pgxs_debian_control.mk
* 'make deb' forces control file regeneration

This reduces crap maintained locally.

It also does mean that to build against server-dev-X.Y package
that is not for Debians default Postgres version, following packages
need to be installed from PGDG (wiki.postgresql.org/wiki/Apt) repo:

  postgresql-client-common
  postgresql-common
  postgresql-server-dev-all

12 years agoMerge remote-tracking branch 'remotes/marko-github/master'
Tarvi Pillessaar [Mon, 31 Dec 2012 08:00:25 +0000 (10:00 +0200)]
Merge remote-tracking branch 'remotes/marko-github/master'