skytools.git
13 years agosql/londiste: fix locale problem in londiste_merge test
Marko Kreen [Fri, 25 May 2012 13:32:26 +0000 (16:32 +0300)]
sql/londiste: fix locale problem in londiste_merge test

We want fixed sort order here to get quick overview of combinations.
Use 'name' type to get non-locale sorting.

Reported-By: Cédric Villemain
13 years agolondiste.create_partitions: improved rule support
Marko Kreen [Fri, 25 May 2012 13:31:53 +0000 (16:31 +0300)]
londiste.create_partitions: improved rule support

13 years agopublic.create_partition: drop rule logic from here
Marko Kreen [Fri, 25 May 2012 10:58:46 +0000 (13:58 +0300)]
public.create_partition: drop rule logic from here

No point maintaing it in two places.

Let the code stay as-is.

13 years agosignal_pidfile: support sig=0 on win32
Marko Kreen [Fri, 25 May 2012 09:30:54 +0000 (12:30 +0300)]
signal_pidfile: support sig=0 on win32

To avoid pywin32 dependency for such basic functionality,
use kernel32.dll via ctypes directly.

13 years agoskytools.UsageError: remove noise word
Marko Kreen [Fri, 25 May 2012 09:27:28 +0000 (12:27 +0300)]
skytools.UsageError: remove noise word

13 years agoCascadeAdmin: add node name prefix messages from db
Marko Kreen [Fri, 25 May 2012 08:53:36 +0000 (11:53 +0300)]
CascadeAdmin: add node name prefix messages from db

13 years agopgq_node.drop_node: drop queue data even if node_info is empty
Marko Kreen [Fri, 25 May 2012 08:52:27 +0000 (11:52 +0300)]
pgq_node.drop_node: drop queue data even if node_info is empty

13 years agolondiste.version(): 3.0.0.15
Marko Kreen [Thu, 24 May 2012 15:31:22 +0000 (18:31 +0300)]
londiste.version(): 3.0.0.15

13 years agopgq_node.version(): 3.0.0.16
Marko Kreen [Thu, 24 May 2012 15:31:22 +0000 (18:31 +0300)]
pgq_node.version(): 3.0.0.16

13 years agocreate_partition: move under londiste schema
Marko Kreen [Thu, 24 May 2012 15:30:12 +0000 (18:30 +0300)]
create_partition: move under londiste schema

It is now generic enough so no custom modifications
are not needed anymore.  So make it always-available.

13 years agocreate_partition: special-case for public grant
Marko Kreen [Thu, 24 May 2012 15:17:40 +0000 (18:17 +0300)]
create_partition: special-case for public grant

13 years agocreate_partition: also load rules from master table
Marko Kreen [Thu, 24 May 2012 15:11:42 +0000 (18:11 +0300)]
create_partition: also load rules from master table

13 years agoskytools.dbstruct: better rule name redirection
Marko Kreen [Thu, 24 May 2012 14:43:03 +0000 (17:43 +0300)]
skytools.dbstruct: better rule name redirection

Old code did not handle WHERE, nor repeated
table references in rule.

13 years agoskytools.scripting: catch EINTR from sleep()
Marko Kreen [Tue, 22 May 2012 10:34:34 +0000 (13:34 +0300)]
skytools.scripting: catch EINTR from sleep()

13 years agoskytools.scripting: detect missing signals
Marko Kreen [Tue, 22 May 2012 09:58:54 +0000 (12:58 +0300)]
skytools.scripting: detect missing signals

Don't hook signals that are not supported by OS.

Needed for win32.

13 years agopgq_node: refresh regtest
Marko Kreen [Mon, 21 May 2012 10:41:20 +0000 (13:41 +0300)]
pgq_node: refresh regtest

13 years agopgq_node.unregister_location: do automatic unsubscribe
Marko Kreen [Mon, 21 May 2012 10:40:19 +0000 (13:40 +0300)]
pgq_node.unregister_location: do automatic unsubscribe

There may be obsolete subscriptions around, do unsubscribe
automatically, instead complaining.

13 years agolondiste remove-table: drop sequence too
Marko Kreen [Wed, 9 May 2012 13:25:46 +0000 (16:25 +0300)]
londiste remove-table: drop sequence too

13 years agolondiste.setup: UsageError requires module prefix
Marko Kreen [Mon, 21 May 2012 07:41:16 +0000 (10:41 +0300)]
londiste.setup: UsageError requires module prefix

13 years agohandlers.part: fix typo
Marko Kreen [Mon, 21 May 2012 07:38:48 +0000 (10:38 +0300)]
handlers.part: fix typo

13 years agolondiste copy: copy table from another node
Marko Kreen [Thu, 17 May 2012 15:03:29 +0000 (18:03 +0300)]
londiste copy: copy table from another node

add-table: --copy-node=NODENAME, store it into table_attrs
copy: take node name from table_attrs

13 years agoskytools_upgrade: fix special cases
Marko Kreen [Thu, 17 May 2012 12:47:00 +0000 (15:47 +0300)]
skytools_upgrade: fix special cases

13 years agolondiste.find_table_oid: drop old version - 9.1+ panics when argument name changes
Marko Kreen [Wed, 16 May 2012 12:13:59 +0000 (15:13 +0300)]
londiste.find_table_oid: drop old version - 9.1+ panics when argument name changes

13 years agosql/logtriga: compile on 9.1+
Marko Kreen [Wed, 16 May 2012 12:07:54 +0000 (15:07 +0300)]
sql/logtriga: compile on 9.1+

13 years agohandlers.dispatch: add comment about differences from part_func
Marko Kreen [Tue, 15 May 2012 15:41:16 +0000 (18:41 +0300)]
handlers.dispatch: add comment about differences from part_func

If create_partitions() does not exist, the table is created
manually.  But there are differences from how table is created.

Add comment about it, we might want to fix it someday.

13 years agoskytools_upgrade: show old version before upgrade
Marko Kreen [Tue, 15 May 2012 11:20:47 +0000 (14:20 +0300)]
skytools_upgrade: show old version before upgrade

13 years agopgq_node.create_node: create branch nodes with disable_insert set
Marko Kreen [Tue, 15 May 2012 11:16:40 +0000 (14:16 +0300)]
pgq_node.create_node: create branch nodes with disable_insert set

This is the proper approach to avoid any unexpected events
in the queue.  The flag is ignored if connection is in 'replica'
role, thus cascaded queueing continues to work.

13 years agopgq.insert_event(): remove unused variable.
Marko Kreen [Tue, 15 May 2012 09:49:23 +0000 (12:49 +0300)]
pgq.insert_event(): remove unused variable.

13 years agopgq.insert_event: ignore disable_insert if in 'replica' role
Marko Kreen [Tue, 15 May 2012 09:46:49 +0000 (12:46 +0300)]
pgq.insert_event: ignore disable_insert if in 'replica' role

Otherwise we cannot use insert_event on branch nodes.

We could allow it in 'local' role too, but another kind-of-valid
behaviour is to skip insert completely in 'local' role.
So until a valid use-case appers, don't ignore the flag
in 'local' role.

13 years agoAdd more contributors
Marko Kreen [Tue, 15 May 2012 09:37:14 +0000 (12:37 +0300)]
Add more contributors

13 years agoMerge branch 'master' of internal-git:/git/dba/skytools-3
Tarvi Pillessaar [Fri, 11 May 2012 07:58:10 +0000 (10:58 +0300)]
Merge branch 'master' of internal-git:/git/dba/skytools-3

13 years agov3.0.2 skytools_3_0_2
Marko Kreen [Thu, 10 May 2012 07:55:47 +0000 (10:55 +0300)]
v3.0.2

13 years agoRefresh debian packaging
Marko Kreen [Thu, 10 May 2012 18:29:43 +0000 (21:29 +0300)]
Refresh debian packaging

13 years agoAUTHORS: Add contributors to 3.x branch
Marko Kreen [Thu, 10 May 2012 18:01:40 +0000 (21:01 +0300)]
AUTHORS: Add contributors to 3.x branch

13 years agoSync AUTHORS list from 2.1 branch
Marko Kreen [Thu, 10 May 2012 17:50:25 +0000 (20:50 +0300)]
Sync AUTHORS list from 2.1 branch

13 years agowalmgr: fix backup from slave
Sergey Burladyan [Thu, 10 May 2012 17:55:43 +0000 (20:55 +0300)]
walmgr: fix backup from slave

Current version improperly remove needed WAL files when creating backup from slave.

The minimum WAL file is file with REDO record, not with latest checkpoint itself.

13 years agolondiste.version(): 3.0.0.14
Marko Kreen [Thu, 10 May 2012 16:19:31 +0000 (19:19 +0300)]
londiste.version(): 3.0.0.14

13 years agopgq_node.version(): 3.0.0.15
Marko Kreen [Thu, 10 May 2012 16:19:31 +0000 (19:19 +0300)]
pgq_node.version(): 3.0.0.15

13 years agopgq.version(): 3.0.0.15
Marko Kreen [Thu, 10 May 2012 16:19:31 +0000 (19:19 +0300)]
pgq.version(): 3.0.0.15

13 years agoInclude simple_consumer script
Marko Kreen [Thu, 10 May 2012 15:55:50 +0000 (18:55 +0300)]
Include simple_consumer script

Quick event processing by simply launching SQL
query for each event.

Forward-ported-by: Juta Vaks
13 years agolondiste: Always use TRUNCATE CASCADE
Marko Kreen [Wed, 9 May 2012 13:23:46 +0000 (16:23 +0300)]
londiste: Always use TRUNCATE CASCADE

Otherwise the operation cannot play well with
foreign keys, on both slave and master.

13 years agoCascadedWorker: publish_local_wm() is missing a commit
Marko Kreen [Mon, 7 May 2012 09:01:37 +0000 (12:01 +0300)]
CascadedWorker: publish_local_wm() is missing a commit

13 years agopsycopgwrapper: allow name= argument to .cursor()
Marko Kreen [Mon, 7 May 2012 09:01:17 +0000 (12:01 +0300)]
psycopgwrapper: allow name= argument to .cursor()

13 years agoGroup-access roles for SQL functions (draft)
Marko Kreen [Wed, 2 May 2012 13:45:00 +0000 (16:45 +0300)]
Group-access roles for SQL functions (draft)

This is attempt for fine-grained access rights for all
Skytools SQL schemas.  As it still needs review,
the rights are not activated by default, instead
following sql files are generated:

  newgrants_<schema>.sql - applies new rights, drop old public access

  oldgrants_<schema>.sql - restores old rights - public execute
              privilege to all functions

Only thing that is active by default is creation of new
groups in upgrade functions.

New access roles:

pgq_reader
    Can consume queues (source-side)

pgq_writer
    Can write into queues (source-side / dest-side)
    Can use pgq_node/pgq_ext schema as regular
    consumer (dest-side)

pgq_admin
    Admin operations on queues, required for CascadedWorker on dest-side.
    Member of pgq_reader and pgq_writer.

londiste_reader
    Member of pgq_reader, needs additional read access to tables.
    (source-side)

londiste_writer
    Member of pgq_admin, needs additional write access to tables.
    (dest-side)

13 years agowalmgr: add option for init-slave to add password from file to .pgpass
Tarvi Pillessaar [Fri, 13 Apr 2012 08:57:22 +0000 (11:57 +0300)]
walmgr: add option for init-slave to add password from file to .pgpass
walmgr: add command synch-standby

13 years agosql/pgq: use terse verbosity in regtests
Marko Kreen [Wed, 2 May 2012 12:34:14 +0000 (15:34 +0300)]
sql/pgq: use terse verbosity in regtests

13 years agopgq.insert_event(): outer wrapper does not need to be secdef
Marko Kreen [Wed, 2 May 2012 12:29:07 +0000 (15:29 +0300)]
pgq.insert_event(): outer wrapper does not need to be secdef

13 years agosource.cfg: minor improvements
Marko Kreen [Wed, 2 May 2012 12:28:08 +0000 (15:28 +0300)]
source.cfg: minor improvements

13 years agohandlers.part: make hash func configurable
Marko Kreen [Wed, 2 May 2012 12:27:40 +0000 (15:27 +0300)]
handlers.part: make hash func configurable

13 years agov3.0.1-real skytools_3_0_1
Marko Kreen [Wed, 18 Apr 2012 12:54:22 +0000 (15:54 +0300)]
v3.0.1-real

13 years agopgq_coop.version(): 3.0.0.4
Marko Kreen [Wed, 18 Apr 2012 12:50:58 +0000 (15:50 +0300)]
pgq_coop.version(): 3.0.0.4

13 years agopgq_node.version(): 3.0.0.14
Marko Kreen [Wed, 18 Apr 2012 12:50:58 +0000 (15:50 +0300)]
pgq_node.version(): 3.0.0.14

13 years agopgq.version(): 3.0.0.14
Marko Kreen [Wed, 18 Apr 2012 12:50:58 +0000 (15:50 +0300)]
pgq.version(): 3.0.0.14

13 years agolondiste.handlers.dispatch: Detailed exception if part_field is NULL
Marko Kreen [Wed, 18 Apr 2012 12:46:31 +0000 (15:46 +0300)]
londiste.handlers.dispatch: Detailed exception if part_field is NULL

Give enough details to locate the event in queue

13 years agoskytools.skylog: make sysloghander compatible with both 2.6 and 2.7
Marko Kreen [Mon, 9 Apr 2012 08:41:04 +0000 (11:41 +0300)]
skytools.skylog: make sysloghander compatible with both 2.6 and 2.7

13 years agov3.0.1
Marko Kreen [Mon, 9 Apr 2012 08:23:33 +0000 (11:23 +0300)]
v3.0.1

13 years agoMerge remote branch 'intgit/master'
Marko Kreen [Thu, 5 Apr 2012 14:25:10 +0000 (17:25 +0300)]
Merge remote branch 'intgit/master'

13 years agoRefresh libusual
Marko Kreen [Thu, 5 Apr 2012 14:23:18 +0000 (17:23 +0300)]
Refresh libusual

13 years agodebian: include skytools.ini in tgz
Marko Kreen [Thu, 5 Apr 2012 11:40:41 +0000 (14:40 +0300)]
debian: include skytools.ini in tgz

13 years agoskylog: stop using standard SysLogHandler, it's broken
Marko Kreen [Thu, 5 Apr 2012 11:04:26 +0000 (14:04 +0300)]
skylog: stop using standard SysLogHandler, it's broken

It fails to handle unicode strings - it puts BOM in
wrong place.  Wrap logging.handlers implementation
in class that simply drops the BOM addition.

13 years agoskytools.config: improved compatibility with logging.Logger
martinko [Mon, 2 Apr 2012 14:33:54 +0000 (16:33 +0200)]
skytools.config: improved compatibility with logging.Logger

13 years agoMerge remote branch 'intgit/master'
Marko Kreen [Mon, 19 Mar 2012 09:55:46 +0000 (11:55 +0200)]
Merge remote branch 'intgit/master'

13 years agov3.0 skytools_3_0
Marko Kreen [Sat, 17 Mar 2012 12:00:49 +0000 (14:00 +0200)]
v3.0

13 years agodebian: Use new htmlinstall target to get html docs
Marko Kreen [Sat, 17 Mar 2012 11:59:26 +0000 (13:59 +0200)]
debian: Use new htmlinstall target to get html docs

13 years agosource.cfg: improve source filters
Marko Kreen [Fri, 16 Mar 2012 21:33:18 +0000 (23:33 +0200)]
source.cfg: improve source filters

13 years agoRefresh libusual
Marko Kreen [Fri, 16 Mar 2012 21:32:23 +0000 (23:32 +0200)]
Refresh libusual

13 years agolondiste.handler: dont crash if handler module does not load
Marko Kreen [Fri, 16 Mar 2012 21:26:26 +0000 (23:26 +0200)]
londiste.handler: dont crash if handler module does not load

As it's not known whether the module is actually needed,
its not good to crash here.

Better would be to import the module only when actually needed,
but lets use this quick fix as temporary solution.

13 years agoAdd howtos and clean up docs
Marko Kreen [Fri, 9 Mar 2012 12:21:10 +0000 (14:21 +0200)]
Add howtos and clean up docs

Include howtos written by Hannu Krosing.

Clean up rest of the docs for release.

13 years agoClean up SQL documentation
Marko Kreen [Tue, 31 Jan 2012 14:44:21 +0000 (16:44 +0200)]
Clean up SQL documentation

By Hannu Krosing, applied with some fixing

13 years agosql/logtriga: compile on 9.2
Marko Kreen [Mon, 5 Mar 2012 12:20:27 +0000 (14:20 +0200)]
sql/logtriga: compile on 9.2

13 years agosql/pgq: 9.2 compat
Marko Kreen [Sat, 18 Feb 2012 19:53:27 +0000 (21:53 +0200)]
sql/pgq: 9.2 compat

13 years agopgq/makefile: report errors from subdirs properly
Marko Kreen [Sat, 18 Feb 2012 19:52:55 +0000 (21:52 +0200)]
pgq/makefile: report errors from subdirs properly

13 years agoadded support for sizes specified in human readable format
martinko [Fri, 17 Feb 2012 09:43:22 +0000 (10:43 +0100)]
added support for sizes specified in human readable format

Config options that hold size in bytes can now be specified in human readable format.
Examples: 1, 2 B, 3K, 4 MB

13 years agoskylog.py: added missing logger aliases (fatal, warn)
martinko [Mon, 13 Feb 2012 17:25:18 +0000 (18:25 +0100)]
skylog.py: added missing logger aliases (fatal, warn)

13 years agodbdict: on attribute access convert KeyError to AttributeError
Marko Kreen [Fri, 10 Feb 2012 10:13:00 +0000 (12:13 +0200)]
dbdict: on attribute access convert KeyError to AttributeError

Otherwise it confuses some code (copy.deepcopy())

13 years agobasescript: exception_sleep param to configure sleep-on-exception
Marko Kreen [Fri, 10 Feb 2012 10:12:20 +0000 (12:12 +0200)]
basescript: exception_sleep param to configure sleep-on-exception

13 years agoDrop all txid install code.
Marko Kreen [Fri, 3 Feb 2012 15:23:38 +0000 (17:23 +0200)]
Drop all txid install code.

It's obsolete since 8.3.  Drop it.

13 years agopgq_node.version(): 3.0.0.13
Marko Kreen [Wed, 1 Feb 2012 20:41:34 +0000 (22:41 +0200)]
pgq_node.version(): 3.0.0.13

13 years agopgq_node: good looking regression diffs
Marko Kreen [Tue, 31 Jan 2012 10:12:46 +0000 (12:12 +0200)]
pgq_node: good looking regression diffs

13 years ago--sync-watermark: limit watermark to specific nodes
Marko Kreen [Tue, 31 Jan 2012 08:58:39 +0000 (10:58 +0200)]
--sync-watermark: limit watermark to specific nodes

This will allow specified nodes to sync global watermark
with each other, without sending it upwards.

This isolates root node from lag on downstream nodes.

13 years agoUpdate INSTALL instructions
Marko Kreen [Thu, 19 Jan 2012 15:22:25 +0000 (17:22 +0200)]
Update INSTALL instructions

13 years agopgq_node.set_global_watermark: fix wm=null check for branch node
Marko Kreen [Wed, 11 Jan 2012 09:54:59 +0000 (10:54 +0100)]
pgq_node.set_global_watermark: fix wm=null check for branch node

It was in wrong IF section

13 years agopgq.version(): 3.0.0.13
Marko Kreen [Tue, 10 Jan 2012 21:40:55 +0000 (22:40 +0100)]
pgq.version(): 3.0.0.13

13 years agopgq.maint_operations: re-check the need for step2
Marko Kreen [Tue, 10 Jan 2012 21:38:30 +0000 (22:38 +0100)]
pgq.maint_operations: re-check the need for step2

Previously the need for step2 was decided by need for step1.

But if pgqd stops/crashed after step1 but before step2,
the step2 will not be run anymore.

Fix this by rechecking if no step1 was needed.

13 years agopkgloader: better version number cleanup
Marko Kreen [Mon, 9 Jan 2012 11:50:55 +0000 (13:50 +0200)]
pkgloader: better version number cleanup

13 years agopgq_ext.version(): 3.0.0.3
Marko Kreen [Mon, 9 Jan 2012 09:51:34 +0000 (11:51 +0200)]
pgq_ext.version(): 3.0.0.3

13 years agopgq_ext: add default value to subconsumer_id column
Marko Kreen [Mon, 9 Jan 2012 09:46:08 +0000 (11:46 +0200)]
pgq_ext: add default value to subconsumer_id column

There is historical code that accesses table directly,
so function defaults are not enough.

13 years agoUse 3.0b1 as version, to get consistent results.
Marko Kreen [Thu, 5 Jan 2012 19:22:09 +0000 (21:22 +0200)]
Use 3.0b1 as version, to get consistent results.

13 years agodebian: stop launching autogen, it must be done before building .deb
Marko Kreen [Thu, 5 Jan 2012 19:20:32 +0000 (21:20 +0200)]
debian: stop launching autogen, it must be done before building .deb

Should matter only to somebody building directly from git,
otherwise the build is always from tgz, where the files exist

13 years agosource.cfg: include autogen.sh
Marko Kreen [Thu, 5 Jan 2012 19:19:55 +0000 (21:19 +0200)]
source.cfg: include autogen.sh

13 years agodebian: use 3.0 (native) as source format
Marko Kreen [Thu, 5 Jan 2012 18:56:36 +0000 (20:56 +0200)]
debian: use 3.0 (native) as source format

otherwise it tries to create diff

13 years agoconfigure: use londiste.py instead pgqadm.py to detect source dir
Marko Kreen [Thu, 5 Jan 2012 18:55:52 +0000 (20:55 +0200)]
configure: use londiste.py instead pgqadm.py to detect source dir

13 years agosource.cfg: include debian files in tgz
Marko Kreen [Thu, 5 Jan 2012 18:55:33 +0000 (20:55 +0200)]
source.cfg: include debian files in tgz

13 years agodebian: add libtool into build-deps
Marko Kreen [Wed, 4 Jan 2012 20:52:21 +0000 (22:52 +0200)]
debian: add libtool into build-deps

It is used to bring config.* files into tree.

Although it would be prefereable to get rid of all
autogen stuff, it is needed only when building
from GIT, but not from .orig.tar.gz

13 years agodebian: drop very suspicious ../include-binaries file
Marko Kreen [Wed, 4 Jan 2012 20:46:07 +0000 (22:46 +0200)]
debian: drop very suspicious ../include-binaries file

13 years agodebian: dont install txid.sql, its obsolete since 8.3
Marko Kreen [Wed, 4 Jan 2012 20:42:09 +0000 (22:42 +0200)]
debian: dont install txid.sql, its obsolete since 8.3

13 years agodebian: drop SQLDIR, simplify module install
Marko Kreen [Wed, 4 Jan 2012 20:40:30 +0000 (22:40 +0200)]
debian: drop SQLDIR, simplify module install

13 years agodebian: orig - use top-level 'make tgz' to make tarball
Marko Kreen [Wed, 4 Jan 2012 20:27:41 +0000 (22:27 +0200)]
debian: orig - use top-level 'make tgz' to make tarball

Otherwise we need to maintain two ways to build source.

13 years agodebian: more cleanups
Marko Kreen [Wed, 4 Jan 2012 20:05:15 +0000 (22:05 +0200)]
debian: more cleanups

- Use ./autgen instead autoreconf.  Latter is broken on non-automake trees.
- Drop override_dh_auto_build, seems unnecessary.
- Move config.mak dep from override_dh_auto_build to override_dh_auto_configure

13 years agodebian: add support files for 8.3 and 9.2
Marko Kreen [Wed, 4 Jan 2012 19:09:57 +0000 (21:09 +0200)]
debian: add support files for 8.3 and 9.2