Skip to content

Commit c679a66

Browse files
author
Susan Douglas
committed
Updated links in README.md, guc_settings.md, limitations.md, spock_functions.md, spockctrl.md, Removed callout in features.md, Formatting changes in creating_subscriber_nodes.md, spock_info.md
1 parent 17792ac commit c679a66

File tree

8 files changed

+35
-43
lines changed

8 files changed

+35
-43
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,4 @@ You cannot roll back an upgrade because of changes to the catalog tables; before
9898
Then, to upgrade the version of Spock that you use to manage your replication cluster, you can remove, build, and upgrade the Spock extension like you would any other [PostgreSQL extension](https://www.postgresql.org/docs/17/extend-extensions.html#EXTEND-EXTENSIONS-UPDATES).
9999

100100

101-
102-
103-
Spock is licensed under the [pgEdge Community License v1.0](PGEDGE-COMMUNITY-LICENSE.md)
101+
To review the Spock license, visit [here](LICENSE.md).

docs/creating_subscriber_nodes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ You can use the following options to override the location of the configuration
3030

3131
| Option | Description
3232
|----------|-------------
33-
|`--hba-conf` | path to the new pg_hba.conf
34-
| `--postgresql-conf` | path to the new postgresql.conf
33+
|`--hba-conf` | path to the new `pg_hba.conf`
34+
| `--postgresql-conf` | path to the new `postgresql.conf`
3535
| `--recovery-conf` | path to the template recovery configuration
3636

37-
Unlike `spock.sub_create`'s other data sync options, this method of cloning ignores replication sets and copies all tables on all databases. However, it's often much faster, especially over high-bandwidth links.
37+
Unlike `spock.sub_create`'s other data sync options, this method of cloning ignores replication sets and copies all tables on all databases. However, it's often much faster, especially over high-bandwidth connections.

docs/features.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,7 @@ You can use a `row_filter` clause with a partitioned table, as well as with indi
8686

8787
Conflicts can arise if a node is subscribed to multiple providers, or when local writes happen on a subscriber node. Without Spock, logical replication can also encounter issues when resolving the value of a running sum (such as a YTD balance).
8888

89-
import {Callout} from 'nextra/components'
90-
91-
<Callout type="info">
92-
Suppose that a running bank account sum contains a balance of `$1,000`. Two transactions "conflict" because they overlap with each from two different multi-master nodes. Transaction A is a `$1,000` withdrawal from the account. Transaction B is also a `$1,000` withdrawal from the account. The correct balance is `$-1,000`. Our Delta-Apply algorithm fixes this problem and highly conflicting workloads with this scenario (like a tpc-c like benchmark) now run correctly at lightning speeds.
93-
</Callout>
89+
*Suppose that a running bank account sum contains a balance of `$1,000`. Two transactions "conflict" because they overlap with each from two different multi-master nodes. Transaction A is a `$1,000` withdrawal from the account. Transaction B is also a `$1,000` withdrawal from the account. The correct balance is `$-1,000`. Our Delta-Apply algorithm fixes this problem and highly conflicting workloads with this scenario (like a tpc-c like benchmark) now run correctly at lightning speeds.*
9490

9591
In the past, Postgres users have relied on special data types and numbering schemes to help prevent conflicts. Unlike other solutions, Spock's powerful and simple conflict-free delta-apply columns instead manage data update conflicts with logic:
9692

@@ -112,6 +108,7 @@ ALTER TABLE pgbench_tellers ALTER COLUMN tbalance SET (log_old_value=true, delta
112108

113109
As a special safety-valve feature, if you ever need to re-set a `log_old_value` column you can temporarily alter the column to `log_old_value` is `false`.
114110

111+
115112
### Conflict Configuration Options
116113

117114
You can configure some Spock extension behaviors with configuration options that are set in the `postgresql.conf` file or via `ALTER SYSTEM SET`:
@@ -191,7 +188,7 @@ process.
191188

192189
We strongly recommend that you use Snowflake Sequences instead of legacy PostgreSQL sequences.
193190

194-
[Snowflake](https://github.com/pgEdge/snowflake-sequences) is a PostgreSQL extension that provides an `int8` and sequence based unique ID solution to optionally replace the PostgreSQL built-in `bigserial` data type. This extension allows Snowflake IDs that are unique within one sequence across multiple PostgreSQL instances in a distributed cluster.
191+
[Snowflake](https://github.com/pgEdge/snowflake) is a PostgreSQL extension that provides an `int8` and sequence based unique ID solution to optionally replace the PostgreSQL built-in `bigserial` data type. This extension allows Snowflake IDs that are unique within one sequence across multiple PostgreSQL instances in a distributed cluster.
195192

196193
The Spock extension includes the following functions to help you manage Snowflake sequences:
197194

docs/guc_settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ To enable conflict resolution, the `track_commit_timestamp` PostgreSQL setting m
4646

4747
**`spock.enable_ddl_replication`**
4848

49-
`spock.enable_ddl_replication` enables [automatic replication](../spock_ext/managing/spock_autoddl.mdx) of ddl statements through the `default` replication set.
49+
`spock.enable_ddl_replication` enables [automatic replication](https://github.com/pgEdge/spock/blob/main/docs/features.md#automatic-ddl-replication) of ddl statements through the `default` replication set.
5050

5151
**`spock.exception_behaviour`**
5252

docs/limitations.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ You can have additional unique constraints upstream if the downstream consumer g
3333

3434
Partial secondary unique indexes are permitted, but will be ignored for conflict resolution purposes.
3535

36-
`spock.check_all_uc_indexes` is an experimental GUC that adds `INSERT` conflict resolution by allowing Spock to consider all unique constraints, not just the primary key or replica identity. [For more information, visit](guc_settings.md).
36+
`spock.check_all_uc_indexes` is an experimental [GUC](https://github.com/pgEdge/spock/blob/main/docs/guc_settings.md) that adds `INSERT` conflict resolution by allowing Spock to consider all unique constraints, not just the primary key or replica identity.
3737

3838
### Unique constraints must not be deferrable
3939

@@ -86,8 +86,7 @@ not replicated to the replica.
8686

8787
### Sequences
8888

89-
We strongly recommend that you use pgEdge [Snowflake Sequences](features.md) rather
90-
than using the legacy sequences described below.
89+
We strongly recommend that you use pgEdge [Snowflake Sequences](https://github.com/pgEdge/snowflake) rather than using the legacy sequences described below.
9190

9291
The state of sequences added to replication sets is replicated periodically
9392
and not in real-time. Dynamic buffer is used for the value being replicated so
@@ -138,7 +137,7 @@ encoding. We recommend using `UTF-8` encoding in all replicated databases.
138137
### Large objects
139138

140139
PostgreSQL's logical decoding facility does not support decoding changes
141-
to [large objects](https://www.postgresql.org/docs/current/largeobjects.html); we recommend instead using the [LOLOR extension](features.md) to manage large objects.
140+
to [large objects](https://www.postgresql.org/docs/current/largeobjects.html); we recommend instead using the [LOLOR extension](https://github.com/pgEdge/lolor) to manage large objects.
142141

143142
Note that DDL limitations apply, so extra care needs to be taken when using
144143
`replicate_ddl_command()`.

docs/spock_functions.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The following user functions are available via the Spock extension:
55
| Command | Description |
66
|----------|-------------|
77
| **Node Management Functions** | You can add and remove nodes dynamically using Spock interfaces.|
8-
| [spock.node_info]() | Returns information about the node on which the function is invoked.
8+
| spock.node_info | Returns information about the node on which the function is invoked.
99
| [spock.node_create](functions/spock_node_create.md) | Define a node for spock.
1010
| [spock.node_drop](functions/spock_node_drop.md) | Remove a spock node.
1111
| [node_add_interface](functions/spock_node_add_interface.md) | Add a new node interface.
@@ -19,44 +19,44 @@ The following user functions are available via the Spock extension:
1919
| [spock.repset_add_table](functions/spock_repset_add_table.md) | Add table(s) to replication set.
2020
| [spock.repset_add_all_tables](functions/spock_repset_add_all_tables.md) | Add all existing table(s) to the replication set.
2121
| [spock.repset_remove_table](functions/spock_repset_remove_table.md) | Remove table from replication set.
22-
| [spock.repset_show_table] |
2322
| [repset_add_seq](functions/spock_repset_add_seq.md) | Deprecated; Adds a sequence to a replication set.
2423
| [repset_add_all_seqs](functions/spock_repset_add_all_seqs.md) | Deprecated; Adds all sequences from the specified schemas to a replication set.
2524
| [repset_remove_seq](functions/spock_repset_remove_seq.md) | Deprecated; Remove a sequence from a replication set.
26-
| [spock.sync_seq] | Synchronize the specified sequence.
25+
| [spock.sync_seq](functions/spock_seq_sync.md) | Synchronize the specified sequence.
2726
| **Subscription Management Functions** | |
2827
| [spock.sub_create](functions/spock_sub_create.md) | Create a subscription.
2928
| [spock.sub_drop](functions/spock_sub_drop.md) | Delete a subscription.
3029
| [spock.sub_disable](functions/spock_sub_disable.md) | Put a subscription on hold, and disconnect from the provider.
3130
| [spock.sub_enable](functions/spock_sub_enable.md) | Make a subscription live.
3231
| [spock.sub_add_repset](functions/spock_sub_add_repset.md) | Add a replication set to a subscription.
3332
| [spock.sub_remove_repset](functions/spock_sub_remove_repset.md) | Drop a replication set from a subscription.
33+
| [spock.sub_resync_table](functions/spock_sub_resync_table.md) | Resynchronize one existing table.
3434
| [spock.sub_show_status](functions/spock_sub_show_status.md) | Display the status of the subcription.
3535
| [spock.sub_show_table](functions/spock_sub_show_table.md) | Show subscription tables.
36+
| [spock.sub_sync](functions/spock_sync.md) | Call this function to synchronize all unsynchronized tables in all sets in a single operation.
3637
| [spock.sub_alter_interface](functions/spock_sub_alter_interface.md) | Modify an interface to a subscription.
3738
| [spock.sub_wait_for_sync](functions/spock_sub_wait_for_sync.md) | Pause until the subscription is synchronized.
38-
| [spock.sub_alter_skiplsn] | Skip transactions until the specified lsn.
39-
| [spock.sub_alter_sync] | Synchronize all missing tables.
40-
| [spock.sub_resync_table] | Synchronize a specific table.
39+
| spock.sub_alter_skiplsn | Skip transactions until the specified lsn.
40+
| spock.sub_alter_sync | Synchronize all missing tables.
4141
| **Miscellaneous Management Functions** | |
4242
| [spock.table_wait_for_sync](functions/spock_table_wait_for_sync.md) | Pause until a table finishes synchronizing.
4343
| [spock.replicate_ddl](functions/spock_replicate_ddl.md) | Enable DDL replication.
44-
| [set_readonly](functions/spock_set_readonly.md) | Turn PostgreSQL read_only mode 'on' or 'off'.
45-
| [spock.spock_version]() | Returns the Spock version in a major/minor version form: `4.0.10`.
46-
| [spock.spock_version_num]() | Returns the Spock version in a single numeric form: `40010`.
47-
| [spock.convert_sequence_to_snowflake] | Convert a Postgres native sequence to a Snowflake sequence.
48-
| [spock.get_channel_stats]() | Returns tuple traffic statistics.
49-
| [spock.get_country]() | Returns the country code if explicitly set; returns `??` if not set.
50-
| [spock.lag_tracker]() | Returns a list of slots, with commit_lsn and commit_timestamp for each.
51-
| [spock.repair_mode] | Used to manage the state of replication - If set to `true`, stops replicating statements; when `false`, resumes replication.
52-
| [spock.replicate_ddl] | Replicate a specific statement.
53-
| [spock.reset_channel_stats] | Reset the channel statistics.
54-
| [spock.spock_max_proto_version] | The highest Spock native protocol supported by the current binary/build.
55-
| [spock.spock_min_proto_version] | The lowest build for which this Spock binary is backward compatible.
56-
| [spock.table_data_filtered] | Scans the specified table and returns rows that match the row filter from the specified replication set(s). Row filters are added to a replication set when adding a table with `repset_add_table`.
57-
| [spock.terminate_active_transactions] | Terminates all active transactions.
58-
| [spock.wait_slot_confirm_lsn] | Wait for the `confirmed_flush_lsn` of the specified slot, or all logical slots if none given.
59-
| [spock.xact_commit_timestamp_origin] | Returns the commit timestamp and origin of the specified transaction.
44+
| spock.set_readonly | Turn PostgreSQL read_only mode 'on' or 'off'.
45+
| spock.spock_version | Returns the Spock version in a major/minor version form: `4.0.10`.
46+
| spock.spock_version_num | Returns the Spock version in a single numeric form: `40010`.
47+
| spock.convert_sequence_to_snowflake | Convert a Postgres native sequence to a Snowflake sequence.
48+
| spock.get_channel_stats | Returns tuple traffic statistics.
49+
| spock.get_country | Returns the country code if explicitly set; returns `??` if not set.
50+
| spock.lag_tracker | Returns a list of slots, with commit_lsn and commit_timestamp for each.
51+
| spock.repair_mode | Used to manage the state of replication - If set to `true`, stops replicating statements; when `false`, resumes replication.
52+
| spock.replicate_ddl | Replicate a specific statement.
53+
| spock.reset_channel_stats | Reset the channel statistics.
54+
| spock.spock_max_proto_version | The highest Spock native protocol supported by the current binary/build.
55+
| spock.spock_min_proto_version | The lowest build for which this Spock binary is backward compatible.
56+
| spock.table_data_filtered | Scans the specified table and returns rows that match the row filter from the specified replication set(s). Row filters are added to a replication set when adding a table with `repset_add_table`.
57+
| spock.terminate_active_transactions | Terminates all active transactions.
58+
| spock.wait_slot_confirm_lsn | Wait for the `confirmed_flush_lsn` of the specified slot, or all logical slots if none given.
59+
| spock.xact_commit_timestamp_origin | Returns the commit timestamp and origin of the specified transaction.
6060

6161

6262

docs/spock_info.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ a single row in this table implies that a command to create a subscription on th
2525

2626
You can connect to the database server and query the `spock.node` table to return information about configured nodes:
2727

28-
```json
28+
```sql
2929
select * from spock.node;
3030
-[ RECORD 1 ]--------
3131
node_id | 673694252

docs/spockctrl.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ The following is sample content from a `spockctrl.json` file; customize the `spo
220220
Spockctrl provides functions to manage different aspects of your Spock replication setup. The functions are grouped by the type of object they manage:
221221

222222
* [Spockctrl node management](#spockctrl-node-management-functions) functions
223-
* [Spockctrl replication management](#spockctrl-node-management-functions) functions
223+
* [Spockctrl replication management](#spockctrl-replication-set-management-functions) functions
224224
* [Spockctrl subscription management](#spockctrl-subscription-management-functions) functions
225225
* [Spockctrl SQL execution](#spockctrl-sql-execution-functions) functions
226226

@@ -921,8 +921,6 @@ After starting replication, we check the lag time between the new node and each
921921
"on_failure": {}
922922
}
923923
}
924-
]
925-
}
926924
```
927925
928926
The SQL command from the last step (in a more readable format) is:

0 commit comments

Comments
 (0)