You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,6 +98,4 @@ You cannot roll back an upgrade because of changes to the catalog tables; before
98
98
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).
99
99
100
100
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).
Copy file name to clipboardExpand all lines: docs/creating_subscriber_nodes.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,8 +30,8 @@ You can use the following options to override the location of the configuration
30
30
31
31
| Option | Description
32
32
|----------|-------------
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`
35
35
| `--recovery-conf` | path to the template recovery configuration
36
36
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.
Copy file name to clipboardExpand all lines: docs/features.md
+3-6Lines changed: 3 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,11 +86,7 @@ You can use a `row_filter` clause with a partitioned table, as well as with indi
86
86
87
87
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).
88
88
89
-
import {Callout} from 'nextra/components'
90
-
91
-
<Callouttype="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.*
94
90
95
91
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:
96
92
@@ -112,6 +108,7 @@ ALTER TABLE pgbench_tellers ALTER COLUMN tbalance SET (log_old_value=true, delta
112
108
113
109
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`.
114
110
111
+
115
112
### Conflict Configuration Options
116
113
117
114
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.
191
188
192
189
We strongly recommend that you use Snowflake Sequences instead of legacy PostgreSQL sequences.
193
190
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.
195
192
196
193
The Spock extension includes the following functions to help you manage Snowflake sequences:
Copy file name to clipboardExpand all lines: docs/guc_settings.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ To enable conflict resolution, the `track_commit_timestamp` PostgreSQL setting m
46
46
47
47
**`spock.enable_ddl_replication`**
48
48
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.
Copy file name to clipboardExpand all lines: docs/limitations.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ You can have additional unique constraints upstream if the downstream consumer g
33
33
34
34
Partial secondary unique indexes are permitted, but will be ignored for conflict resolution purposes.
35
35
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.
37
37
38
38
### Unique constraints must not be deferrable
39
39
@@ -86,8 +86,7 @@ not replicated to the replica.
86
86
87
87
### Sequences
88
88
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.
91
90
92
91
The state of sequences added to replication sets is replicated periodically
93
92
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.
138
137
### Large objects
139
138
140
139
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.
142
141
143
142
Note that DDL limitations apply, so extra care needs to be taken when using
| [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.
| 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.
0 commit comments