Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

londiste(5) [debian man page]

LONDISTE(5)															       LONDISTE(5)

NAME
londiste - PostgreSQL replication engine written in python SYNOPSIS
[londiste] job_name = asd DESCRIPTION
The londiste configuration file follow the famous .INI syntax. It contains only one section named londiste. Most defaults values are reasonable ones. That means you can only edit provider_db, subscriber_db and pgq_queue_name and be done with londiste configuration. OPTIONS
You can configure the following options into the londiste section. job_name Each Skytools daemon process must have a unique job_name. Londiste uses it also as consumer name when subscribing to queue. provider_db Provider database connection string (DSN). subscriber_db Subscriber database connection string (DSN). pgq_queue_name Name of the queue to read from. Several subscribers can read from same queue. logfile Where to log londiste activity. pidfile Where to store the pid of the main londiste process, the replay one. lock_timeout Few operations take lock on provider (provider add/remove, compare, repair). This parameter specifies timeout in seconds (float) how long a lock can be held. New in version 2.1.8. Default: 10 loop_delay How often to poll events from provider. In seconds (float). Default: 1. pgq_lazy_fetch How many events to fetch at a time when processing a batch. Useful when you know a single transaction (maintenance UPDATE command, e.g.) will produce a lot of events in a single batch. When lazily fetching, a cursor is used so as to still process a single batch in a single transaction. Default: 0, always fetch all events of the batch, not using a cursor. log_count Number of log files to keep. Default: 3 log_size Max size for one log file. File is rotated if max size is reached. Default: 10485760 (10M) use_skylog If set, search for [./skylog.ini, ~/.skylog.ini, /etc/skylog.ini]. If found then the file is used as config file for Pythons logging module. It allows setting up fully customizable logging setup. Default: 0 EXAMPLE
[londiste] job_name = test_to_subcriber provider_db = dbname=provider port=6000 host=127.0.0.1 subscriber_db = dbname=subscriber port=6000 host=127.0.0.1 # it will be used as sql ident so no dots/spaces pgq_queue_name = londiste.replika logfile = /tmp/%(job_name)s.log pidfile = /tmp/%(job_name)s.pid SEE ALSO
londiste(1) 03/13/2012 LONDISTE(5)

Check Out this Related Man Page

QUEUE_MOVER(1)															    QUEUE_MOVER(1)

NAME
queue_mover - PgQ consumer that copies data from one queue to another. SYNOPSIS
queue_mover.py [switches] config.ini DESCRIPTION
queue_mover is PgQ consumer that transports events from source queue into target queue. One use case is when events are produced in several databases then queue_mover is used to consolidate these events into single queue that can then be processed by consumers who need to handle theses events. For example in case of patitioned databases it's convenient to move events from each partition into one central queue database and then process them there. That way configuration and dependancies of partiton databases are simpler and more robust. Another use case is to move events from OLTP database to batch processing server. Transactionality: events will be inserted as one transaction on target side. That means only batch_id needs to be tracked on target side. QUICK-START Basic PgQ setup and usage can be summarized by the following steps: 1. PgQ must be installed both in source and target databases. See pgqadm man page for details. 2. Target database must also have pgq_ext schema installed. It is used to keep sync between two databases. 3. Create a queue_mover configuration file, say qmover_sourceq_to_targetdb.ini 4. create source and target queues $ pgqadm.py sourcedb_ticker.ini create <srcqueue> $ pgqadm.py targetdb_ticker.ini create <dstqueue> 5. launch queue mover in daemon mode $ queue_mover.py -d qmover_sourceq_to_targetdb.ini 6. start producing and consuming events CONFIG
Common configuration parameters job_name Name for particulat job the script does. Script will log under this name to logdb/logserver. The name is also used as default for PgQ consumer name. It should be unique. pidfile Location for pid file. If not given, script is disallowed to daemonize. logfile Location for log file. loop_delay If continuisly running process, how long to sleep after each work loop, in seconds. Default: 1. connection_lifetime Close and reconnect older database connections. log_count Number of log files to keep. Default: 3 log_size Max size for one log file. File is rotated if max size is reached. Default: 10485760 (10M) use_skylog If set, search for [./skylog.ini, ~/.skylog.ini, /etc/skylog.ini]. If found then the file is used as config file for Pythons logging module. It allows setting up fully customizable logging setup. Common PgQ consumer parameters pgq_queue_name Queue name to attach to. No default. pgq_consumer_id Consumers ID to use when registering. Default: %(job_name)s queue_mover parameters src_db Source database. dst_db Target database. dst_queue_name Target queue name. Example config file [queue_mover] job_name = eventlog_to_target_mover src_db = dbname=sourcedb dst_db = dbname=targetdb pgq_queue_name = eventlog dst_queue_name = copy_of_eventlog pidfile = log/%(job_name)s.pid logfile = pid/%(job_name)s.log COMMAND LINE SWITCHES
Following switches are common to all skytools.DBScript-based Python programs. -h, --help show help message and exit -q, --quiet make program silent -v, --verbose make program more verbose -d, --daemon make program go background Following switches are used to control already running process. The pidfile is read from config then signal is sent to process id specified there. -r, --reload reload config (send SIGHUP) -s, --stop stop program safely (send SIGINT) -k, --kill kill program immidiately (send SIGTERM) BUGS
Event ID is not kept on target side. If needed is can be kept, then event_id seq at target side need to be increased by hand to inform ticker about new events. 03/13/2012 QUEUE_MOVER(1)
Man Page