qadmin - Easy to use admin console to examine and administer PgQ queues.
This is a psql-like console for queue administration.
The console offers a large number of commands to setup, control and manage PgQ
It also offers a non-interactive mode to run one or more commands.
qadmin keeps its history file in the home of the user (~/.qadmin_history).
Specify host to connect to (default: localhost via unix
Specify user name.
Queue name, it is used as the default queue if it is
Execute console command.
Execute file containing console commands.
qadmin offers to connect to other databases or queues from the console itself.
Connect the console with the specified connection string, optional parameter to
set the default queue on connection.
Connect the console to the specified queue and/or node.
Install PgQ or Londiste to the connected database.
Create the specified queue.
Set one or more parameters on one or all queues at once.
Drop the named queue.
Register a consumer on a queue, or at a specified tick or based on another
Unregister one or all consumers, if the console is not connected to a queue, its
name must be provided.
Register a subconsumer to a consumer, if the console is not connected to a
queue, its name must be provided.
Unregister one or all subconsumers from a consumer, if the console is not
connected to a queue, its name must be provided. Current batch can be aborted
if the close batch subcommand is provided.
Show all the console commands.
Show details of one or all queues.
Show DDL for the specified table.
Show DDL for the specified sequence.
Show details of one or all consumers on one or all queues.
Show details of one or all nodes on one or all queues.
Show details of the batch, default queue must be set (see connect queue)
Show details of the current batch for the specified consumer, default queue must
be set (see connect queue)
All these commands are applied on the node where the console is connected to.
Skip trigger creation.
Does not truncate the table on the destination.
Set table state to ok.
with tgflags= IUDBAQLS
Trigger creation flags, see below for details.
Put urlencoded contents of old row to ev_extra2.
Create skip trigger. Same as S flag.
with when= expr
If expr returns false, do not insert event.
with ev_XX= EXPR
Overwrite default ev_* columns (see below).
Trigger creation flags (default: AIUDL):
•I - ON INSERT
•U - ON UPDATE
•D - ON DELETE
•Q - use pgq.sqltriga() as trigger function
•L - use pgq.logutriga() as trigger function
•B - BEFORE
•A - AFTER
•S - SKIP
Queue event fields:
•ev_type - I/U/D
•ev_data - partial SQL statement
•ev_extra1 - table name
•ev_extra2 - optional urlencoded backup
Add the specified sequence to Londiste replication.
Remove the specified table(s) from the Londiste replication.
Remove the specified sequence(s) from the Londiste replication.
List registered tables and informations about them:
•table_name - fully-qualified table name
•local - does events needs to be applied to local
•merge_state - show phase of initial copy
•custom_snapshot - remote snapshot of COPY
•table_attrs - urlencoded dict of table
•dropped_ddl - partition combining: temp place to
•copy_role - partition combining: how to handle
•copy_pos - position in parallel copy working
copy_role = lead
On copy start, drop indexes and store in dropped_ddl.
On copy finish change state to catching-up, then wait until copy_role turns to
Catching-up: if dropped_ddl is not NULL, restore them.
copy_role = wait-copy
On copy start, wait until role changes (to wait-replay).
copy_role = wait-replay
On copy finish, tag as catching-up
Wait until copy_role is NULL, then proceed.
List registered sequences on this node and their last value.
On Master, list tables not registered on set.
On Slave, list tables on set but not registered locally.
Clear current buffer.
Successful program execution.
PostgreSQL environment variables can be used.
TODO : is it up-to-date ?
•create <root | branch | leaf> node
<node> location <loc> [on <qname>];
•alter node <name> provider
•alter node <name> takeover <oldnow>
•alter node <name> rename <new>;
•alter node <name>
•drop node <name> [on <qname>];