QADMIN(1) | QADMIN(1) |
NAME¶
qadmin - Easy to use admin console to examine and administer PgQ queues.
SYNOPSIS¶
qadmin [options]
DESCRIPTION¶
This is a psql-like console for queue administration.
The console offers a large number of commands to setup, control and manage PgQ queueing system.
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).
GENERAL OPTIONS¶
--help
--version
CONNECTION OPTIONS¶
-h host
-p port
-U user
-d dbname
-Q queuename
SPECIFIC OPTIONS¶
-c cmd_string
-f execfile
CONNECTION COMMANDS¶
qadmin offers to connect to other databases or queues from the console itself.
connect <connstring> [queue=<qname>];¶
Connect the console with the specified connection string, optional parameter to set the default queue on connection.
connect [queue=<qname>] [node=<node>];¶
Connect the console to the specified queue and/or node.
MANAGEMENT COMMANDS¶
install pgq | londiste;¶
Install PgQ or Londiste to the connected database.
create queue <qname>;¶
Create the specified queue.
alter queue <qname | *> set param =<foo=1>,<bar=2>;¶
Set one or more parameters on one or all queues at once.
drop queue <qname>;¶
Drop the named queue.
register consumer <consumer> [on <qname> | at <tick_id> | copy <consumer>];¶
Register a consumer on a queue, or at a specified tick or based on another consumer.
unregister consumer <consumer | *> [from <qname>];¶
Unregister one or all consumers, if the console is not connected to a queue, its name must be provided.
register subconsumer <subconsumer> for <consumer> [on <qname>];¶
Register a subconsumer to a consumer, if the console is not connected to a queue, its name must be provided.
unregister subconsumer <subconsumer | *> for <consumer> [from <qname>] [close [batch]];¶
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 COMMANDS¶
show help;¶
Show all the console commands.
show queue [ <qname | *> ];¶
Show details of one or all queues.
show table <tbl>;¶
Show DDL for the specified table.
show sequence <seq>;¶
Show DDL for the specified sequence.
show consumer [ <consumer | *> [on <qname>] ];¶
Show details of one or all consumers on one or all queues.
show node [ <node | *> [on <qname>] ];¶
Show details of one or all nodes on one or all queues.
show batch <batch_id>;¶
Show details of the batch, default queue must be set (see connect queue)
show batch <consumer>;¶
Show details of the current batch for the specified consumer, default queue must be set (see connect queue)
LONDISTE COMMANDS¶
All these commands are applied on the node where the console is connected to.
londiste add table <tbl> [with ... ]¶
with no_triggers
with skip_truncate
with expect_sync
with tgflags=IUDBAQLS
with backup
with skip
with when=expr
with ev_XX=EXPR
Trigger creation flags (default: AIUDL):
Queue event fields:
londiste add sequence <seq>;¶
Add the specified sequence to Londiste replication.
londiste remove table <tbl> [,tbl];¶
Remove the specified table(s) from the Londiste replication.
londiste remove sequence <seq> [,seq];¶
Remove the specified sequence(s) from the Londiste replication.
londiste tables;¶
List registered tables and informations about them:
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 NULL.
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.
londiste seqs;¶
List registered sequences on this node and their last value.
londiste missing;¶
On Master, list tables not registered on set.
On Slave, list tables on set but not registered locally.
OTHER COMMANDS¶
exit;¶
Quit program.
^D¶
Quit program.
^C¶
Clear current buffer.
EXIT STATUS¶
0
ENVIRONMENT¶
PostgreSQL environment variables can be used.
NOT IMPLEMENTED COMMANDS¶
TODO : is it up-to-date ?
09/28/2016 |