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)
Marko Kreen [Thu, 8 Jan 2009 20:03:03 +0000 (20:03 +0000)]
skytools.magic_insert: quoting, work on DictRow
Marko Kreen [Thu, 8 Jan 2009 19:59:11 +0000 (19:59 +0000)]
skytools.quote_statement: accept arg list (from 2.2)
Marko Kreen [Thu, 8 Jan 2009 19:56:00 +0000 (19:56 +0000)]
skytools.dbstruct: import quoting from 2.2 branch
Marko Kreen [Mon, 29 Dec 2008 16:43:27 +0000 (16:43 +0000)]
Fix cquoting crash with Decimal() type.
Seems there can be types which have buffer operations struct,
but no function pointers. So check also for called functions.
Martin Pihlak [Fri, 28 Nov 2008 13:27:38 +0000 (13:27 +0000)]
WalMgr changes:
- Added recovery restart point handling, retain WAL files since the last
restart point. Additional slave config parameter "slave_bin" for specifying
location for postgres binaries.
- Slave backup now creates backup_label and history files.
Martin Pihlak [Wed, 17 Sep 2008 10:48:19 +0000 (10:48 +0000)]
- s/self.jobs/jobs/ in "reload"
- fix "start" error message when job is already running
Marko Kreen [Wed, 17 Sep 2008 10:37:50 +0000 (10:37 +0000)]
proper quoting for dispatcher scripts
Martin Pihlak [Fri, 20 Jun 2008 08:05:58 +0000 (08:05 +0000)]
- improved error messages on startup if no config file specified.
- walmgr.py stop now also stops syncdaemon
- pg_auth file is copied to slave as part of archiving. restored during boot.
- cleanup in remote_walmgr() to always pass config file to slave walmgr.
- master_backup() now reports exceptions.
Marko Kreen [Wed, 18 Jun 2008 09:17:00 +0000 (09:17 +0000)]
import typo fix from -stable, restore stat_add
to keep the differences minimal
Marko Kreen [Wed, 18 Jun 2008 09:15:50 +0000 (09:15 +0000)]
DBScript.stat_add - keep the old function for compat
Marko Kreen [Wed, 30 Apr 2008 14:28:42 +0000 (14:28 +0000)]
add new files
Marko Kreen [Wed, 30 Apr 2008 14:24:01 +0000 (14:24 +0000)]
cascading work:
- let AdminScript detect number of args by introspection
- track event_id_seq downstream
- on rename update subscribers too
- slightly more fleshed out switchover
Marko Kreen [Wed, 30 Apr 2008 14:20:22 +0000 (14:20 +0000)]
Postgres 8.0.x requires <utils/hsearch.h> for oid_hash.
Per report by Marcin Stępnicki
Marko Kreen [Wed, 30 Apr 2008 14:18:55 +0000 (14:18 +0000)]
test/londiste: create sys dir if not exists
Marko Kreen [Wed, 30 Apr 2008 14:17:26 +0000 (14:17 +0000)]
set tags as phony target
Marko Kreen [Fri, 25 Apr 2008 14:48:32 +0000 (14:48 +0000)]
pgq_set: pause/resume/change-provider/rename-node work now
Marko Kreen [Fri, 25 Apr 2008 14:45:53 +0000 (14:45 +0000)]
skytools.quote_statement(): support list/tuple args too
Marko Kreen [Fri, 25 Apr 2008 14:42:51 +0000 (14:42 +0000)]
doc update
Marko Kreen [Wed, 23 Apr 2008 15:12:27 +0000 (15:12 +0000)]
tests/londiste: clean sys dir more
Marko Kreen [Wed, 23 Apr 2008 15:11:58 +0000 (15:11 +0000)]
sql/pgq: convert pgq.get_batch_info() to use out parameters
Marko Kreen [Wed, 23 Apr 2008 15:07:04 +0000 (15:07 +0000)]
python/pgq: more set work
- use worker_name == node_name
- make status command show lag
- pass root tick_time downstream
Marko Kreen [Wed, 23 Apr 2008 15:04:10 +0000 (15:04 +0000)]
sql/pgq_set: remove explicit node worker name, it will be equal to node_name
Marko Kreen [Wed, 23 Apr 2008 15:01:09 +0000 (15:01 +0000)]
sql/pgq: allow external ticker to specify tick_time
Marko Kreen [Wed, 23 Apr 2008 15:00:11 +0000 (15:00 +0000)]
pgq.event: forgot to export EV_UNTAGGED
Marko Kreen [Tue, 22 Apr 2008 12:57:22 +0000 (12:57 +0000)]
forgot couple files
Marko Kreen [Tue, 22 Apr 2008 12:46:13 +0000 (12:46 +0000)]
more pgq_set/londiste cleanup
Marko Kreen [Tue, 22 Apr 2008 12:45:35 +0000 (12:45 +0000)]
pgq.Consumer - complain on untagged events, instead of sending them to retry queue
Marko Kreen [Tue, 22 Apr 2008 12:44:08 +0000 (12:44 +0000)]
parse_logtriga_sql - epydoc complained on bad docstring
Marko Kreen [Tue, 22 Apr 2008 12:42:47 +0000 (12:42 +0000)]
move common db patterns to skytools.adminscript module
Marko Kreen [Tue, 22 Apr 2008 12:41:05 +0000 (12:41 +0000)]
python: rework imports to get better docs...
Marko Kreen [Tue, 22 Apr 2008 12:39:18 +0000 (12:39 +0000)]
doc/Makefile: use standard epydoc launcher
Marko Kreen [Tue, 22 Apr 2008 12:38:31 +0000 (12:38 +0000)]
make tags file for python
Marko Kreen [Thu, 17 Apr 2008 13:23:19 +0000 (13:23 +0000)]
fix retry/failed event handling in pgq.Consumer
Marko Kreen [Thu, 17 Apr 2008 09:22:06 +0000 (09:22 +0000)]
more londiste work
- parallel copy
- dont error out in 'copy' when columns differ - its add-table problem
- test big cascade with lot of tables
Marko Kreen [Thu, 17 Apr 2008 09:20:12 +0000 (09:20 +0000)]
todo update
Marko Kreen [Thu, 17 Apr 2008 09:19:42 +0000 (09:19 +0000)]
dont log so excessively
Marko Kreen [Thu, 17 Apr 2008 09:19:13 +0000 (09:19 +0000)]
forget db completely on close_database() to allow location change
Marko Kreen [Wed, 16 Apr 2008 09:55:41 +0000 (09:55 +0000)]
fix more bugs - stats, trigger type
Marko Kreen [Tue, 15 Apr 2008 13:11:08 +0000 (13:11 +0000)]
todo update
Marko Kreen [Tue, 15 Apr 2008 13:03:46 +0000 (13:03 +0000)]
wrong file
Marko Kreen [Tue, 15 Apr 2008 13:02:47 +0000 (13:02 +0000)]
more setconsumer/londiste work.
simple init/event processing/copy seems to work.
Marko Kreen [Tue, 15 Apr 2008 06:24:22 +0000 (06:24 +0000)]
Use $(MAKE) consistently instead of plain 'make'.
Patch by Pierre-Emmanuel André
Marko Kreen [Fri, 11 Apr 2008 13:58:31 +0000 (13:58 +0000)]
drop support for psycopg1
Marko Kreen [Fri, 11 Apr 2008 13:54:09 +0000 (13:54 +0000)]
fix root notifications
Marko Kreen [Fri, 11 Apr 2008 13:41:34 +0000 (13:41 +0000)]
send events
Marko Kreen [Fri, 11 Apr 2008 12:34:13 +0000 (12:34 +0000)]
use empty DESTDIR
Marko Kreen [Fri, 11 Apr 2008 12:33:14 +0000 (12:33 +0000)]
more test
Marko Kreen [Fri, 11 Apr 2008 12:32:10 +0000 (12:32 +0000)]
txid: install dummy empty txid.sql on 8.3
Marko Kreen [Fri, 11 Apr 2008 12:28:28 +0000 (12:28 +0000)]
set registration functions
Marko Kreen [Fri, 11 Apr 2008 12:27:38 +0000 (12:27 +0000)]
triggers kinda work
Marko Kreen [Fri, 11 Apr 2008 12:24:47 +0000 (12:24 +0000)]
pgq.denytriga - simple deny trigger
Marko Kreen [Mon, 7 Apr 2008 07:01:12 +0000 (07:01 +0000)]
remove debug print
Marko Kreen [Sat, 5 Apr 2008 17:37:19 +0000 (17:37 +0000)]
proper messages, fq name
Marko Kreen [Sat, 5 Apr 2008 17:25:22 +0000 (17:25 +0000)]
new file
Marko Kreen [Sat, 5 Apr 2008 17:25:07 +0000 (17:25 +0000)]
fix record SELECT, allow NULL column
Marko Kreen [Sat, 5 Apr 2008 17:06:36 +0000 (17:06 +0000)]
missing file
Marko Kreen [Fri, 4 Apr 2008 20:26:11 +0000 (20:26 +0000)]
tiny fixes
Marko Kreen [Fri, 4 Apr 2008 18:34:43 +0000 (18:34 +0000)]
AUTHORS update from -stable
Marko Kreen [Fri, 4 Apr 2008 18:34:01 +0000 (18:34 +0000)]
todo update
Marko Kreen [Fri, 4 Apr 2008 18:16:21 +0000 (18:16 +0000)]
more admin work
Marko Kreen [Fri, 4 Apr 2008 09:12:06 +0000 (09:12 +0000)]
rename ProviderSetup to LondisteSetup
Marko Kreen [Fri, 4 Apr 2008 09:11:01 +0000 (09:11 +0000)]
Couple fixes for 'walmgr restore' from -stable:
- Make sure pg_tblspc exists, 8.3 seems to require it
- Copy config files/symlinks from old data dir over
Original patch by Zoltán Böszörményi, applied with minor rework
Marko Kreen [Fri, 4 Apr 2008 09:08:43 +0000 (09:08 +0000)]
clarify var names
Marko Kreen [Fri, 4 Apr 2008 09:03:19 +0000 (09:03 +0000)]
setconsumer conversion, copy fix from -stable
Marko Kreen [Fri, 4 Apr 2008 09:02:08 +0000 (09:02 +0000)]
new londiste wrapper
Marko Kreen [Thu, 3 Apr 2008 09:29:39 +0000 (09:29 +0000)]
make fkeys work
Marko Kreen [Thu, 3 Apr 2008 09:11:14 +0000 (09:11 +0000)]
simplify psycopgwrapper:
- remove QuotedString, its unused now
- drop the ugly __setitem__ implementation
- drop __setattr__, __delattr_
row is supposed to be r/o
Marko Kreen [Thu, 3 Apr 2008 09:00:27 +0000 (09:00 +0000)]
dollar quoting
Marko Kreen [Thu, 3 Apr 2008 08:59:58 +0000 (08:59 +0000)]
import fixes
Marko Kreen [Thu, 13 Mar 2008 14:50:33 +0000 (14:50 +0000)]
detect postgres death in recovery
Marko Kreen [Wed, 12 Mar 2008 16:19:29 +0000 (16:19 +0000)]
walmgr: Detect stale pidfile by doing kill(pid, 0) to see if process exists.
Patch by Charles Duffy
Marko Kreen [Wed, 12 Mar 2008 12:50:56 +0000 (12:50 +0000)]
slight comments cleanup
Marko Kreen [Tue, 11 Mar 2008 20:47:24 +0000 (20:47 +0000)]
Fix bugs in previous commit.
Marko Kreen [Tue, 11 Mar 2008 16:25:15 +0000 (16:25 +0000)]
very experimental row.col access, add __slots__
Marko Kreen [Tue, 11 Mar 2008 16:20:26 +0000 (16:20 +0000)]
new tokenizer that handles quotes properly, use it everywhere
Marko Kreen [Tue, 11 Mar 2008 16:17:07 +0000 (16:17 +0000)]
unquote_ident() + unquote_literal()
Marko Kreen [Mon, 10 Mar 2008 08:06:01 +0000 (08:06 +0000)]
refresh regtests
Marko Kreen [Fri, 7 Mar 2008 16:53:06 +0000 (16:53 +0000)]
unfinished londiste reorg, backup commit
Marko Kreen [Fri, 7 Mar 2008 16:48:32 +0000 (16:48 +0000)]
use E quoting if backslash appears
Marko Kreen [Fri, 7 Mar 2008 16:47:46 +0000 (16:47 +0000)]
pgq/triggers: allow making backup of old row in ev_extra2
also clean up some common code
Marko Kreen [Fri, 7 Mar 2008 15:18:47 +0000 (15:18 +0000)]
use E quoting in sql triggers
Marko Kreen [Thu, 6 Mar 2008 21:24:01 +0000 (21:24 +0000)]
sqltools: experimental code - dbdict, mk_*_sql
Marko Kreen [Thu, 6 Mar 2008 21:19:00 +0000 (21:19 +0000)]
quoting.py: remove unnecessary urllib import
Marko Kreen [Mon, 3 Mar 2008 16:04:05 +0000 (16:04 +0000)]
sql/pgq/Makefile: explicit file list
Marko Kreen [Mon, 3 Mar 2008 16:03:08 +0000 (16:03 +0000)]
pgq/triggers/common.h: reorder fields, comment them
Marko Kreen [Mon, 3 Mar 2008 16:02:34 +0000 (16:02 +0000)]
pgq/lowlevel: fix error messages
Marko Kreen [Mon, 3 Mar 2008 16:00:20 +0000 (16:00 +0000)]
pgq_set: is_root() functions