Marko Kreen [Thu, 24 Nov 2011 09:08:54 +0000 (11:08 +0200)]
skytools.scripting: fix fileConfig on python 2.5
There is no disable_existing_loggers argument so
we need manually enable all loggers again.
Marko Kreen [Wed, 23 Nov 2011 20:16:05 +0000 (22:16 +0200)]
skytools.BaseScript: fix use_skylog vs. module level loggers.
We want to support loggers initialized on module import time,
but for some reason logging.config.fileConfig() disables all
existing loggers by default.
Set disable_existing_loggers=False when calling to stop such behaviour.
Marko Kreen [Tue, 22 Nov 2011 14:24:33 +0000 (16:24 +0200)]
pgq_node.version(): 3.0.0.11
Marko Kreen [Tue, 22 Nov 2011 14:24:33 +0000 (16:24 +0200)]
pgq.version(): 3.0.0.10
Marko Kreen [Mon, 21 Nov 2011 11:07:25 +0000 (13:07 +0200)]
todo: few ideas to avoid connstrings on command line
Marko Kreen [Mon, 21 Nov 2011 11:06:43 +0000 (13:06 +0200)]
tests: replace 'replay' with 'worker'
Marko Kreen [Mon, 21 Nov 2011 11:06:15 +0000 (13:06 +0200)]
drop-node: better behaviour when node is down
Marko Kreen [Mon, 21 Nov 2011 10:14:04 +0000 (12:14 +0200)]
pgq_node.drop_node: refuse to drop if node is our provider.
safety check, admin tool should have done change-provider
before dropping.
Marko Kreen [Fri, 18 Nov 2011 16:27:51 +0000 (18:27 +0200)]
londiste: remove 'replay' alias for 'worker'
Marko Kreen [Fri, 18 Nov 2011 14:41:59 +0000 (16:41 +0200)]
skytools3.txt: Minor cleanup
Marko Kreen [Fri, 18 Nov 2011 14:32:42 +0000 (16:32 +0200)]
pgq_node.drop_node: cleanup
- dont catch errors from pgq_node.unregister_subscriber,
pgq.unregister_consumer is now silent.
- use pgq_node.unregister_location() to drop location, that will also
send event on root.
- delete all state on pgq_node.subscriber_info when local node is dropped
- call pgq_node.unregister_subscriber() only when non-local node is dropped
Marko Kreen [Fri, 18 Nov 2011 14:21:17 +0000 (16:21 +0200)]
pgq.unregister_consumer: do not raise errors
- be silent if consumer does not exist
- if subconsumers exist, unregister those too
Marko Kreen [Fri, 18 Nov 2011 14:20:02 +0000 (16:20 +0200)]
create_partition.sql: regtests, add indexes
- add indexes and constraints from parent table
- use timestamptz instead of timestamptz
- regtests
Marko Kreen [Fri, 18 Nov 2011 09:58:35 +0000 (11:58 +0200)]
dbstruct.rx_replace: report all input in exception.
This helps to debug failures.
Marko Kreen [Fri, 18 Nov 2011 09:55:24 +0000 (11:55 +0200)]
londiste copy: fast exit if table is removed
Old code crashed, which sucks.
It can leave constraints/fkeys unapplied, but its to complex to restore here.
Better let the trigger-happy admins clean after themselves.
Marko Kreen [Thu, 17 Nov 2011 18:15:15 +0000 (20:15 +0200)]
README: draft upgrade description
Marko Kreen [Thu, 17 Nov 2011 18:03:06 +0000 (20:03 +0200)]
pgq.insert_event: support working with pgq 2.x schema
this allows to upgrade module without uprading schema.
Marko Kreen [Thu, 17 Nov 2011 13:34:19 +0000 (15:34 +0200)]
upgrade/final/v3.0_pgq_core.sql: generate, based on skytools_3_0_b0 tag
Marko Kreen [Tue, 15 Nov 2011 21:20:18 +0000 (23:20 +0200)]
Merge remote-tracking branch 'martino/master'
Marko Kreen [Tue, 15 Nov 2011 14:13:16 +0000 (16:13 +0200)]
londiste.version(): 3.0.0.10
Marko Kreen [Tue, 15 Nov 2011 14:13:16 +0000 (16:13 +0200)]
pgq_node.version(): 3.0.0.10
Marko Kreen [Tue, 15 Nov 2011 14:13:15 +0000 (16:13 +0200)]
pgq.version(): 3.0.0.9
Marko Kreen [Tue, 15 Nov 2011 14:12:14 +0000 (16:12 +0200)]
change-provider: catch error when unregistering
Marko Kreen [Tue, 15 Nov 2011 14:10:18 +0000 (16:10 +0200)]
doc/todo: remove old/done items
martinko [Mon, 14 Nov 2011 19:54:46 +0000 (20:54 +0100)]
skytools.scripting: datefmt support in logging
Marko Kreen [Mon, 14 Nov 2011 10:50:01 +0000 (12:50 +0200)]
Merge remote-tracking branch 'intgit/master'
Marko Kreen [Mon, 14 Nov 2011 10:47:51 +0000 (12:47 +0200)]
doc/devnotes: way to make 'git log' nicer
Marko Kreen [Mon, 14 Nov 2011 10:46:47 +0000 (12:46 +0200)]
sql/pgq_node: doc: describe workflow for cascaded consumer
Marko Kreen [Mon, 14 Nov 2011 10:46:24 +0000 (12:46 +0200)]
skytools.AdminScript: fix typo
Marko Kreen [Mon, 14 Nov 2011 10:45:33 +0000 (12:45 +0200)]
skytools.BaseScript: .cf_defaults attribute
This gives simple way to add defaults
Marko Kreen [Mon, 14 Nov 2011 10:44:31 +0000 (12:44 +0200)]
change-provider: move old-provider ops to the end
That means even if they fail, all the other nodes are already updated.
Marko Kreen [Mon, 14 Nov 2011 10:43:47 +0000 (12:43 +0200)]
pgq_node.register_location: skip insert if location is null
This allows tag-dead for non-existing node.
Martin Pihlak [Thu, 10 Nov 2011 08:33:30 +0000 (10:33 +0200)]
Master xarchive now runs "sync" on slave.
This is an attempt at minimizing the chance of WAL file corruption
on slave server crash -- master xarchive command does not return
success until the the buffers on slave have been flushed to disk.
martinko [Tue, 8 Nov 2011 12:39:23 +0000 (13:39 +0100)]
scripts/scriptmgr.py: added --wait option
The new option will make ScriptMgr to wait for all jobs to finish their processing.
This applies to both "stop" and "restart" commands.
Btw, restarting should be (much) faster now.
martinko [Tue, 8 Nov 2011 11:29:48 +0000 (12:29 +0100)]
scriptmgr.py: fix small logging bug
martinko [Tue, 8 Nov 2011 11:29:03 +0000 (12:29 +0100)]
config.py: resubmit lost commit
Marko Kreen [Tue, 8 Nov 2011 08:16:35 +0000 (10:16 +0200)]
skytools.scripting: logging cleanup
- allow different log format when logging verbosely
- don't assign to self.log during __init__, instead use class var
This allows subclass var to override self.log
Marko Kreen [Mon, 7 Nov 2011 07:33:43 +0000 (09:33 +0200)]
skytools: make apipkg visible outside
Now it should be possible to re-use the module elsewhere.
Marko Kreen [Fri, 4 Nov 2011 12:00:15 +0000 (14:00 +0200)]
skytools.dedent: new function for removing indent
extract code from .print_ini and make usable elsewhere too.
Marko Kreen [Fri, 4 Nov 2011 11:59:14 +0000 (13:59 +0200)]
skytools.sqltools: tolerate missing installer_config
Marko Kreen [Fri, 4 Nov 2011 11:50:19 +0000 (13:50 +0200)]
londiste.playback: move plugin-only dest_table to table_info
its pain to do in sql, so lets do it in python
Marko Kreen [Tue, 1 Nov 2011 21:33:58 +0000 (23:33 +0200)]
tests/rename: test for --dest-table
Marko Kreen [Tue, 1 Nov 2011 21:31:57 +0000 (23:31 +0200)]
Cleanup and fix remaining bugs in --dest-table code
Marko Kreen [Thu, 27 Oct 2011 20:39:15 +0000 (23:39 +0300)]
pgq.Consumer: support .consumer_filter with lazy_fetch
Marko Kreen [Thu, 27 Oct 2011 13:28:06 +0000 (16:28 +0300)]
londiste: support table renaming
- add .dest_table field to londiste.table_info
- use it for mapping merged tables on leaf
- make handlers use it for sql generaion
- fkey-related functions keep using real table name
Marko Kreen [Wed, 26 Oct 2011 13:48:02 +0000 (16:48 +0300)]
londiste.handlers: turn off REAL_TABLE by default
does not work on merged tables.
Marko Kreen [Wed, 26 Oct 2011 07:47:50 +0000 (10:47 +0300)]
handlers.dispatch: Fix quoting in temp table naming
Marko Kreen [Tue, 25 Oct 2011 12:44:59 +0000 (15:44 +0300)]
Merge remote-tracking branch 'intgit/master'
Marko Kreen [Tue, 25 Oct 2011 12:36:20 +0000 (15:36 +0300)]
setup_skytools: rename scripts in build dir, not install dir
This avoids install overwriting compat scripts.
Stop supporting --script-suffix switch, too annoying.
Custom suffix is still possible via config.mak.
Marko Kreen [Mon, 24 Oct 2011 19:52:11 +0000 (22:52 +0300)]
tests/londiste: sanitize a bit
turn off log grep to make output human-viewable
Marko Kreen [Mon, 24 Oct 2011 19:51:43 +0000 (22:51 +0300)]
testlib: use code blocks
Marko Kreen [Fri, 21 Oct 2011 10:58:41 +0000 (13:58 +0300)]
londiste.handlers.dispatch: 'analyze' argument for handlers
Make ANALYZE on temp tables configurable and off by default
Marko Kreen [Fri, 21 Oct 2011 10:35:17 +0000 (13:35 +0300)]
londiste.handlers.dispatch: cache dist fields
Dimitri Fontaine [Mon, 17 Oct 2011 15:06:18 +0000 (17:06 +0200)]
Fix skytools3-walmgr dependencies (support 9.1)
Marko Kreen [Mon, 17 Oct 2011 10:21:26 +0000 (03:21 -0700)]
Merge pull request #3 from lalinsky/splitkeys
skytools.parse_sqltriga_sql: Split key and value fields in parse_logtriga_sql
Marko Kreen [Mon, 17 Oct 2011 10:18:09 +0000 (03:18 -0700)]
Merge pull request #2 from lalinsky/master
Fix compilation of logtriga on PostgreSQL 9.0
Lukáš Lalinský [Sun, 16 Oct 2011 11:20:31 +0000 (13:20 +0200)]
Add an option to split the key and value fields
Lukáš Lalinský [Sun, 16 Oct 2011 09:33:02 +0000 (11:33 +0200)]
Fix compilation of logtriga on PostgreSQL 9
This patch copies the is_keyword function from sql/pgq/triggers/stringutil.c
and uses it instead of calling ScanKeywordLookup directly. It also avoid
quoting some strings that are not reserved keywords.
Martin Pihlak [Fri, 14 Oct 2011 14:20:53 +0000 (17:20 +0300)]
reset synchronous_standby_names on walmgr "stop".
Martin Pihlak [Fri, 14 Oct 2011 14:01:42 +0000 (17:01 +0300)]
Merge branch 'master' of internal-git:/git/dba/skytools-3
Martin Pihlak [Fri, 14 Oct 2011 13:31:07 +0000 (16:31 +0300)]
add "pg_archivecleanup" to recovery.conf.
Martin Pihlak [Fri, 14 Oct 2011 12:42:46 +0000 (15:42 +0300)]
add "primary_conninfo" option to --init-slave
Martin Pihlak [Fri, 14 Oct 2011 12:15:48 +0000 (15:15 +0300)]
added init.d script guessing.
Marko Kreen [Fri, 14 Oct 2011 06:32:29 +0000 (09:32 +0300)]
skytools.scripting: make non-skylog logging attach to root
use_skylog logging was already doing it. Now that simple
logging does it do, using self.log is not mandatory anymore,
code can use 'logging' module directly.
Also make console and logfile output configurable.
Martin Pihlak [Thu, 13 Oct 2011 13:11:53 +0000 (16:11 +0300)]
Fix invalid reference to os.path.mkdir
Marko Kreen [Thu, 13 Oct 2011 11:23:59 +0000 (14:23 +0300)]
misc/bumpver: show current version for all schemas
Marko Kreen [Thu, 13 Oct 2011 11:21:28 +0000 (14:21 +0300)]
londiste.version(): 3.0.0.9
Marko Kreen [Thu, 13 Oct 2011 11:21:27 +0000 (14:21 +0300)]
pgq_node.version(): 3.0.0.9
Marko Kreen [Thu, 6 Oct 2011 14:03:32 +0000 (16:03 +0200)]
doc/Makefile: remove more refs to old docs
Marko Kreen [Thu, 6 Oct 2011 13:56:42 +0000 (15:56 +0200)]
ticker/makefile: stop using so many PG_* vars
sql/Makefile started to pass PG_CPPFLAGS on cmdline,
this breaks custom vars here.
Marko Kreen [Wed, 5 Oct 2011 16:43:11 +0000 (18:43 +0200)]
Merge remote-tracking branch 'intgit/master'
Marko Kreen [Wed, 5 Oct 2011 16:39:13 +0000 (18:39 +0200)]
Fix breakage from doc removal
Marko Kreen [Tue, 4 Oct 2011 17:00:14 +0000 (19:00 +0200)]
tests/londiste: test pgq_autocommit
Marko Kreen [Tue, 4 Oct 2011 16:50:22 +0000 (18:50 +0200)]
londiste copy: fix broken lock table
Marko Kreen [Tue, 4 Oct 2011 16:17:40 +0000 (18:17 +0200)]
pgq.Consumer: pgq_autocommit config params
for setting source side db into autocommit mode
Marko Kreen [Tue, 4 Oct 2011 16:16:15 +0000 (18:16 +0200)]
skytools.DBscript: set_database_defaults method
Mainly for simple way to set db mode across all get_database() calls.
Marko Kreen [Tue, 4 Oct 2011 16:15:39 +0000 (18:15 +0200)]
CascadedConsumer: consistent access to provider db
Marko Kreen [Tue, 4 Oct 2011 15:10:20 +0000 (17:10 +0200)]
handlers.dispatch: skip pk-only table update earlier
Marko Kreen [Tue, 4 Oct 2011 14:46:40 +0000 (16:46 +0200)]
handlers.bulk: avoid updates on pk-only table
Marko Kreen [Tue, 4 Oct 2011 14:39:53 +0000 (16:39 +0200)]
pgq_node.drop_node: non-existing queue should not be error
Marko Kreen [Tue, 4 Oct 2011 14:39:08 +0000 (16:39 +0200)]
londiste: local_only - give sane filter if no local tables
Marko Kreen [Tue, 4 Oct 2011 14:37:50 +0000 (16:37 +0200)]
handlers.dispatch: skip update on pk-only table
Marko Kreen [Fri, 30 Sep 2011 12:47:47 +0000 (15:47 +0300)]
Import debian/ fixes from Dimitri Fontaine
Due to some miscommunication the branches got out-ot-sync
and needed squashing now.
changelog:
- Fix known bugs in packaging (Replaces, update-alternatives, prerm scripts)
- Forgot to delete the postrm script in the merge.
- Get rid of example *) cases in postinst scripts.
- Remove debhelper automatic code from the scripts.
- The PostgreSQL extensions should provide the virtual package skytools-modules.
- By producing a clean orig archive, it's possible to avoid the *.o in debian/source/include-binaries
- Another round of review with Christoph Berg
- Remove debian/README.source
- Add some more specific copyright notices, per debian FTP Master
- Reproduce the whole copyright of lib/test/attregex/testregex.c
- The doc/ needs to get realclean'ed, distclean is shy of a brick here.
- Add a build-depend on automake, which provides /usr/bin/aclocal
- Changelog entry for bug #632574, and some cleanup
- Add the pgq upgrade script to the packaging
- Allow for cleanup up the debian tree when the upgrade script never was build before.
- Add a useful debian/README.source
- Better debian/rules orig target (exclude vcs, automatic grabbing of the package version)
- Fix debian/rules for building when postgresql-server-dev-9.1 is installed too.
- Update packaging for postgresql-9.1, make 8.3 8.4 and 9.0 compat optional
- Typo fix in postgresql-9.1-pgq3 depends
Marko Kreen [Mon, 26 Sep 2011 13:15:28 +0000 (16:15 +0300)]
londiste copy: support startup isolation level
when switching back from serializable level, use old level.
This will help support autocommit on source side.
Marko Kreen [Wed, 21 Sep 2011 13:35:42 +0000 (16:35 +0300)]
londiste copy: dont set empty string as ddl
Marko Kreen [Wed, 21 Sep 2011 13:23:04 +0000 (16:23 +0300)]
Rename fake_local to vtable, move to separate file
Marko Kreen [Wed, 21 Sep 2011 13:22:12 +0000 (16:22 +0300)]
londiste x.ini show-handlers: info about handlers
Marko Kreen [Wed, 21 Sep 2011 13:01:07 +0000 (16:01 +0300)]
londiste.local_add_table: merge-leaf: add table to combined-root too
It will be added with same trigger_args & table_attrs as leaf table.
If this is unwanted, add table to combined-root first.
Martin Pihlak [Wed, 21 Sep 2011 09:38:47 +0000 (12:38 +0300)]
Fix a bug introduced by a bugfix b08445.
Marko Kreen [Mon, 19 Sep 2011 09:29:41 +0000 (12:29 +0300)]
sql/*/Makefile: stop depending on config.mak
Only vars taken from there were PG_CONFIG and PGXS.
Instead let sql/Makefile give PG_CONFIG as param.
This makes easier to test across multiple Postgres versions.
Marko Kreen [Mon, 19 Sep 2011 09:27:56 +0000 (12:27 +0300)]
londiste regtest: dont assign to IN param (8.3)
Marko Kreen [Mon, 19 Sep 2011 08:43:09 +0000 (11:43 +0300)]
qadmin: better ident unquoting
old one did fail on '.' inside "".
Marko Kreen [Sun, 18 Sep 2011 20:37:10 +0000 (23:37 +0300)]
Fix bad var in plpy_applyrow
Marko Kreen [Sun, 18 Sep 2011 20:33:49 +0000 (23:33 +0300)]
londiste copy: reorganize DDL restoration logic
Fix transactionality around merge-node ddl handling.
Move restoration to playback, happens when 'catching-up' has ddl.
This allows DDL restoration in separate tx (merge node) to fail.
Also lock table before ddl reading, this avoid concurrent ddl droppers.
Marko Kreen [Sun, 18 Sep 2011 20:24:36 +0000 (23:24 +0300)]
londiste.get_table_list: make sure all state combinations work
Although we may not support all combinations from UI side,
it does not guarantee that some combination cannot happen,
so try to give reasonable roles in any case.
New logic:
- if table has ddl, it's lead
- in case of no dll and at least one complete copy, let the copy be follower:
that means it will do copy into table without touching ddl.
Marko Kreen [Sun, 18 Sep 2011 20:22:35 +0000 (23:22 +0300)]
sql/pgq_coop: sync tests
Marko Kreen [Sun, 18 Sep 2011 20:20:56 +0000 (23:20 +0300)]
londiste.handlers.dispatch: USE_REAL_TABLE is not under self.
Marko Kreen [Sun, 18 Sep 2011 20:20:18 +0000 (23:20 +0300)]
gq_node.get_worker_state: avoid convlicting var name
Marko Kreen [Fri, 16 Sep 2011 11:26:01 +0000 (14:26 +0300)]
sql/londiste: sync regtests with changes
contains:
- avoid 'default' function arg
- override CONTRIB_TESTDB for 9.1
- unidiff for regression.diffs
- quiet plpgsql install
- 'merge_all' when adding table
Marko Kreen [Fri, 16 Sep 2011 10:45:26 +0000 (13:45 +0300)]
londiste.upgrade_schema: move table_info check upgrade here