-
Notifications
You must be signed in to change notification settings - Fork 44
Spock documentation improvement attempt #177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
5042267
eac817e
c359d43
12c3aa9
dd865bf
9a8c4d0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,17 +5,26 @@ | |
| ### SYNOPSIS | ||
|
|
||
| `spock.node_create (node_name name, dsn text, location text, country text, info jsonb)` | ||
|
|
||
| ### DESCRIPTION | ||
|
|
||
| Create a spock node. | ||
| Create a spock node. | ||
| Initialize internal state of the spock extension that will be used further in communications with other replication participants to identify the node and connection settings. | ||
| It doesn't check correctness or reachability of the dsn at the moment. | ||
susan-pgedge marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Parameters 'location', 'country', and 'info' are optional and is intended for simplifying automatisation infrastructure. | ||
susan-pgedge marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ### EXAMPLE | ||
| ### EXAMPLE | ||
|
|
||
| `spock.node_create ('n1', 'host=10.1.2.5 user=rocky dbname=demo')` | ||
| ### POSITIONAL ARGUMENTS | ||
|
|
||
| ### ARGUMENTS | ||
| node_name | ||
| The name of the node. Only one node is allowed per database, and each node in a cluster must have a unique name. To use the Snowflake extension, use the convention n1,n2, etc. Example: n1 | ||
| The name of the node. Only one node is allowed per database, and each node in a cluster must have a unique name. Example: n1 | ||
| dsn | ||
| The connection string to the node. The user in this string should equal the OS user. This connection string should be reachable from outside and match the one used later in the sub-create command. Example: host=10.1.2.5 port= 5432 user=rocky dbname=demo | ||
| location | ||
| (optional) Text string identifying the node location as precise as needed. Doesn't affect any internal logic. | ||
susan-pgedge marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| country | ||
| (optional) Text string dedicated to conveniently store and expose the country code where the spock node is located. Doesn't affect any internal logic. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Text string dedicated to conveniently store and expose should be Text string dedicated to conveniently storing and exposing |
||
| info | ||
| (optional) JSONB field where arbitrary meta information may be stored in structured form. The only optional field that affects the spock behaviour is the 'tiebreaker' integer value that serves as a priority value (less value - more priority) that is used in conflict resolution cases in case commit timestamp is the same for all the concurrent transactions updating the same row. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,20 @@ | ||
| ## NAME | ||
| ## NAME | ||
|
|
||
| `spock.sub_disable ()` | ||
|
|
||
| ### SYNOPSIS | ||
|
|
||
| `spock.sub_disable (subscription_name name, immediate boolean)` | ||
|
|
||
| ### DESCRIPTION | ||
| Disable a subscription by putting it on hold and disconnect from provider. | ||
| Disable a subscription by putting it on hold and disconnect from provider. | ||
|
|
||
| ### EXAMPLE | ||
|
|
||
| `spock sub_disable 'sub_n2n1'` | ||
| `spock sub_disable('sub_n2n1')` | ||
|
|
||
| ### ARGUMENTS | ||
| subscription_name | ||
| The name of the existing subscription. | ||
| immediate | ||
| If true, the subscription is stopped immediately, otherwise it will be only stopped at the end of current transaction; the default is false. | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,7 +44,6 @@ The following user functions are available via the Spock extension: | |
| | spock.spock_version | Returns the Spock version in a major/minor version form: `4.0.10`. | ||
| | spock.spock_version_num | Returns the Spock version in a single numeric form: `40010`. | ||
| | spock.get_channel_stats | Returns tuple traffic statistics. | ||
| | spock.get_country | Returns the country code if explicitly set; returns `??` if not set. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I confirmed with Asif, that we should NOT remove this. Thanks. |
||
| | spock.lag_tracker | Returns a list of slots, with commit_lsn and commit_timestamp for each. | ||
| | spock.repair_mode | Used to manage the state of replication - If set to `true`, stops replicating statements; when `false`, resumes replication. | ||
| | spock.replicate_ddl | Replicate a specific statement. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.