From 517896aeebd360ba3f99c795bbd656ce77d222cd Mon Sep 17 00:00:00 2001 From: Dj Walker-Morgan Date: Wed, 16 Oct 2024 11:17:13 +0100 Subject: [PATCH 1/3] Fix up for docs-1082 issue Signed-off-by: Dj Walker-Morgan --- .../docs/livecompare/3/command_line_usage.mdx | 45 ++++++++++++++++--- .../docs/livecompare/3/installation.mdx | 6 +-- 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/product_docs/docs/livecompare/3/command_line_usage.mdx b/product_docs/docs/livecompare/3/command_line_usage.mdx index 5cd59e1d777..ef4da2a1b7b 100644 --- a/product_docs/docs/livecompare/3/command_line_usage.mdx +++ b/product_docs/docs/livecompare/3/command_line_usage.mdx @@ -2,16 +2,51 @@ navTitle: Command line usage title: Command-line usage originalFilePath: command_line_usage.md - +deepToC: true --- ## Compare mode -Copy any `/etc/livecompare/template*.ini` to use in your project and adjust as necessary. See [Settings](settings/). +Copy any `/etc/livecompare/template*.ini` to use in your project and adjust as necessary. ``` cp /etc/livecompare/template_basic.ini my_project.ini +``` + +See [Settings](settings/) for a description of the various configuration options. + +For example, the basic template contains: + +```ini +; © Copyright EnterpriseDB UK Limited 2019-2024 - All rights reserved. + +[General Settings] +logical_replication_mode = off +max_parallel_workers = 2 + +[First Connection] +dsn = host=192.168.0.100 port=5432 dbname=live1 user=postgres + +[Second Connection] +dsn = host=192.168.0.200 port=5432 dbname=live2 user=postgres +[Third Connection] +dsn = host=192.168.0.200 port=5432 dbname=live3 user=postgres + +[Output Connection] +dsn = port=5432 dbname=liveoutput user=postgres + +[Table Filter] +schemas = schema_name = 'public' +``` + +This basic template compares three connections, `live1`, `live2`, and `live3`, and outputs the results to the `liveoutput` database. LiveCompare only uses the `public` schema in the comparison. + +### Running the comparison + +To run the comparison, run livecompare and pass it the name of your settings file as an argument. If you have created a `my_project.ini` file, execute the following command: + +``` livecompare my_project.ini ``` @@ -119,9 +154,7 @@ For more details about the `conflicts` mode, see [PGD support](bdr_support/). ## Dry-run mode -!!! Tip "New Feature" - LiveCompare dry-run mode support is available for LiveCompare version 2.2.0 and later. -!!! +Dry-run mode allows you to run the comparison without actually executing it. This mode is useful for checking the configuration before running the comparison. For example, suppose you have the following INI file: @@ -146,7 +179,7 @@ dsn = dbname=liveoutpu schemas = schema_name = 'public' ``` -As the DSN under `Output Connection` (the LiveCompare cache database) is incorrect, running LiveCompare initially fails with: +As the DSN under `Output Connection` (the LiveCompare cache database) is incorrect due to a mis-spelling of `liveoutput`, running LiveCompare initially fails with: ``` Output connection is not reachable. diff --git a/product_docs/docs/livecompare/3/installation.mdx b/product_docs/docs/livecompare/3/installation.mdx index 3a83f30f158..25d7d548105 100644 --- a/product_docs/docs/livecompare/3/installation.mdx +++ b/product_docs/docs/livecompare/3/installation.mdx @@ -9,11 +9,11 @@ Before installing, consult the [LiveCompare requirements](requirements) to ensur You can install LiveCompare from the EnterpriseDB's Repos 2.0 repository. -If you have not already installed the appropriate EnterpriseDB repository, follow the instructions in the [EnterpriseDB repository installation guide](/repos/getting_started/). +If you haven't already installed the appropriate EnterpriseDB repository, follow the instructions in the [EnterpriseDB repository installation guide](/repos/getting_started/). Then, to install LiveCompare, run the following command: -### RHEL 8, or othe RPM-based distributions: +### RHEL 8, or other RPM-based distributions: ```bash sudo dnf install edb-livecompare @@ -37,7 +37,7 @@ If you prefer to download the LiveCompare package manually, you can download the After downloading the package, you can install it using the following command: -### RHEL 8, or othe RPM-based distributions: +### RHEL 8, or other RPM-based distributions: ```bash sudo rpm -i edb-livecompare-.rpm From 2c30aa3a06040713cb479c40cc3ff269148d00d8 Mon Sep 17 00:00:00 2001 From: Dj Walker-Morgan <126472455+djw-m@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:13:55 +0100 Subject: [PATCH 2/3] Update product_docs/docs/livecompare/3/command_line_usage.mdx --- product_docs/docs/livecompare/3/command_line_usage.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product_docs/docs/livecompare/3/command_line_usage.mdx b/product_docs/docs/livecompare/3/command_line_usage.mdx index ef4da2a1b7b..e5572b11bd9 100644 --- a/product_docs/docs/livecompare/3/command_line_usage.mdx +++ b/product_docs/docs/livecompare/3/command_line_usage.mdx @@ -7,7 +7,7 @@ deepToC: true ## Compare mode -Copy any `/etc/livecompare/template*.ini` to use in your project and adjust as necessary. +Copy any `/etc/livecompare/template*.ini` to use in your project and adjust as necessary. See [Settings](settings/) for details. ``` cp /etc/livecompare/template_basic.ini my_project.ini From cdbabe2035c55bb3ec271ed466c9725b47eb7f49 Mon Sep 17 00:00:00 2001 From: Dj Walker-Morgan <126472455+djw-m@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:22:42 +0100 Subject: [PATCH 3/3] Reworked github's dropping of a suggestion --- product_docs/docs/livecompare/3/command_line_usage.mdx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/product_docs/docs/livecompare/3/command_line_usage.mdx b/product_docs/docs/livecompare/3/command_line_usage.mdx index e5572b11bd9..568f3b4f197 100644 --- a/product_docs/docs/livecompare/3/command_line_usage.mdx +++ b/product_docs/docs/livecompare/3/command_line_usage.mdx @@ -7,15 +7,9 @@ deepToC: true ## Compare mode -Copy any `/etc/livecompare/template*.ini` to use in your project and adjust as necessary. See [Settings](settings/) for details. +Create a `.ini` file to configure LiveCompare. See [Settings](settings/) for a description of the various configuration options. -``` -cp /etc/livecompare/template_basic.ini my_project.ini -``` - -See [Settings](settings/) for a description of the various configuration options. - -For example, the basic template contains: +For example, a basic template contains: ```ini ; © Copyright EnterpriseDB UK Limited 2019-2024 - All rights reserved.