<commit_before>
= londiste3(1) =

== NAME ==

londiste3 - tool for managing trigger-based replication for PostgreSQL.

== SYNOPSIS ==

  londiste3 <config.ini> command [subcommand] [options]

== DESCRIPTION ==

Londiste allows you to setup and administer the replication, and is run as a
daemon to handle the replication itself. (Londiste is just a complex
PgQ Consumer).

See <<examples,EXAMPLES>> below to start your first trigger-based
replication in a few steps.

The 'command' is one of Node, Replication, Information or Internal
commands listed below.

Londiste introduces the notion of 'takeover'.  It is the action when a
local node takes over the work of another node. The other node can be a
root node or a branch node and it can be dead or alive when the action
is run.

Londiste also allows (among many other features): cascading replication,
partial replication and custom handlers for replication.

== GENERAL OPTIONS ==

  -V, --version::
    Print version info and exit.

  -h, --help::
    Show this help message and exit.

  -q, --quiet::
    Log only errors and warnings.

  -v, --verbose::
    Log verbosely.

  -d, --daemon::
    Run in daemon mode (go background).

== SPECIFIC OPTIONS ==

  --ini::
    Display sample ini file.

  --set="'param=val[,param=value]'"::
    Override config setting.

== DAEMON OPTIONS ==

  -r, --reload::
    Reload config (send SIGHUP).

  -s, --stop::
    Stop program safely (send SIGINT).

  -k, --kill::
    Kill program immediately (send SIGTERM).

== REPLICATION EXTRA ARGUMENTS ==

  --rewind::
    Change queue position according to destination.

  --reset::
    Reset queue position on destination side.

== NODE INITIALIZATION COMMANDS ==

Initialization commands are the only ones that requires a connection
string argument. It is the connection string that Londiste3 will store,
other nodes will use it to connect to the current node.

=== create-root <node> <connstr> ===

Initializes a Master node.

The <node> is the name of the node, it should be unique.
The <connstr> argument is the connection string to the database on the
Master node.

=== create-branch <node> <connstr> --provider=<public_connstr> ===

Initializes a Slave node which can be used as a reference for other
nodes.

The <node> is the name of the node, it should be unique.
The <connstr> argument is the connection string to the database on the
current node and <public_connstr> is the connection string to the
provider database (it can be a root node or a branch node).

=== create-leaf <node> <connstr> --provider=<public_connstr> ===

Initializes a Slave node which can not be used as a reference for other
nodes.

The <node> is the name of the node, it should be unique.
The <connstr> argument is the connection string to the database on the
current node and <public_connstr> is the connection string to the
provider database (it can be a root node or a branch node).

  --merge='qname'::
    combined queue name

== NODE ADMINISTRATION COMMANDS ==

=== pause ===

Pause the consumer: the replication of the events is stopped and can be
resumed later.

=== resume ===

When the consumer has been paused, let it replay again.

=== change-provider <tonode> ===

Make <tonode> become the new provider for the current node.

TODO: londiste.py need update (param change from --provider)

=== takeover <fromnode> [--target=<tonode>] [--all] [--dead] ===

This command allows to achieve failover and switchover for any of your
providers (root or branch nodes).

  --target='tonode'::
    Target node of the takeover.

  --all::<commit_msg>doc: mention config option in create-* commands<commit_after>
= londiste3(1) =

== NAME ==

londiste3 - tool for managing trigger-based replication for PostgreSQL.

== SYNOPSIS ==

  londiste3 <config.ini> command [subcommand] [options]

== DESCRIPTION ==

Londiste allows you to setup and administer the replication, and is run as a
daemon to handle the replication itself. (Londiste is just a complex
PgQ Consumer).

See <<examples,EXAMPLES>> below to start your first trigger-based
replication in a few steps.

The 'command' is one of Node, Replication, Information or Internal
commands listed below.

Londiste introduces the notion of 'takeover'.  It is the action when a
local node takes over the work of another node. The other node can be a
root node or a branch node and it can be dead or alive when the action
is run.

Londiste also allows (among many other features): cascading replication,
partial replication and custom handlers for replication.

== GENERAL OPTIONS ==

  -V, --version::
    Print version info and exit.

  -h, --help::
    Show this help message and exit.

  -q, --quiet::
    Log only errors and warnings.

  -v, --verbose::
    Log verbosely.

  -d, --daemon::
    Run in daemon mode (go background).

== SPECIFIC OPTIONS ==

  --ini::
    Display sample ini file.

  --set="'param=val[,param=value]'"::
    Override config setting.

== DAEMON OPTIONS ==

  -r, --reload::
    Reload config (send SIGHUP).

  -s, --stop::
    Stop program safely (send SIGINT).

  -k, --kill::
    Kill program immediately (send SIGTERM).

== REPLICATION EXTRA ARGUMENTS ==

  --rewind::
    Change queue position according to destination.

  --reset::
    Reset queue position on destination side.

== NODE INITIALIZATION COMMANDS ==

Initialization commands will set up "public connect string" for
current node.  It is a connect string that other nodes will
use to connect to current node.  The local Londiste itself
uses 'db' option from config file to connect to local node,
which can have different user rights than scripts coming
over public connect string.

Connect strings can be set in either command line or config file.
Command line overrides config.  Setting them up in config
might be more comfortable.  See `londiste3 --ini` for details.

=== create-root <node> [<public_connstr_for_node>] ===

Initializes a Master node.

The <node> is the name of the node, it should be unique.

=== create-branch <node> [<public_connstr_for_node>] [--provider=<connstr_to_provider>] ===

Initializes a Slave node which can be used as a reference for other
nodes.

The <node> is the name of the node, it should be unique.
The <public_connstr_for_node> argument is the connection string to the database
on the current node and <connstr_to_provider> is the connection string to the
provider database (it can be a root node or a branch node).

=== create-leaf <node> [<public_connstr_for_node>] [--provider=<connstr_to_provider>] ===

Initializes a slave node which can not be used as a reference for other
nodes.

The <node> is the name of the node, it should be unique.
The <public_connstr_for_node> argument is the connection string to the database
on the current node and <connstr_to_provider> is the connection string to the
provider database (it can be a root node or a branch node).

  --merge='qname'::
    combined queue name

== NODE ADMINISTRATION COMMANDS ==

=== pause ===

Pause the consumer: the replication of the events is stopped and can be
resumed later.

=== resume ===

When the consumer has been paused, let it replay again.

=== change-provider <tonode> ===

Make <tonode> become the new provider for the current node.

TODO: londiste.py need update (param change from --provider)

=== takeover <fromnode> [--target=<tonode>] [--all] [--dead] ===

This command allows to achieve failover and switchover for any of your
providers (root or branch nodes).

  --target='tonode'::
    Target node of the takeover.

  --all::
{'fraction_non_alphanumeric': 0.0910057127673708, 'fraction_numerical': 0.0013285505513484788, 'mean_word_length': 3.731615336266499, 'pattern_counts': {'":': 2, '<': 48, '<?xml version=': 0, '>': 48, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1255889', 'n_tokens_mistral': 2243, 'n_tokens_neox': 2135, 'n_words': 1039}