Skip to content

Commit

Permalink
Refix casing on Parallel Apply
Browse files Browse the repository at this point in the history
TBD, adjust feature list
  • Loading branch information
djw-m committed Jul 28, 2023
1 parent 0518356 commit 25a594f
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions product_docs/docs/pgd/5/parallelapply.mdx
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
---
title: Parallel apply
navTitle: Parallel apply
title: Parallel Apply
navTitle: Parallel Apply
---

## What is parallel apply?
## What is Parallel Apply?

Parallel apply is a feature of PGD that allows a PGD node to use multiple writers per subscription. This behavior generally increases the throughput of a subscription and improves replication performance.
Parallel Apply is a feature of PGD that allows a PGD node to use multiple writers per subscription. This behavior generally increases the throughput of a subscription and improves replication performance.

The transactional changes from the subscription are written by the multiple parallel apply writers. However, each writer ensures that the final commit of its transaction doesn't violate the commit order as executed on the origin node. If there's a violation, an error occurs, and the transaction can be rolled back.
The transactional changes from the subscription are written by the multiple Parallel Apply writers. However, each writer ensures that the final commit of its transaction doesn't violate the commit order as executed on the origin node. If there's a violation, an error occurs, and the transaction can be rolled back.

!!! Warning Possible deadlocks
It might be possible for this out-of-order application of changes to trigger a deadlock. PGD currently resolves such deadlocks between parallel apply writers by aborting and retrying the transactions involved. Experiencing a large number of such deadlocks is an indication that parallel apply isn't a good fit for your workload. In this case, consider disabling it.
It might be possible for this out-of-order application of changes to trigger a deadlock. PGD currently resolves such deadlocks between Parallel Apply writers by aborting and retrying the transactions involved. Experiencing a large number of such deadlocks is an indication that Parallel Apply isn't a good fit for your workload. In this case, consider disabling it.
!!!

## Configuring parallel apply
Two variables control parallel apply in PGD 5: [`bdr.max_writers_per_subscription`](/pgd/latest/reference/pgd-settings#bdrmax_writers_per_subscription) (defaults to 8) and [`bdr.writers_per_subscription`](/pgd/latest/reference/pgd-settings#bdrwriters_per_subscription) (defaults to 2).
## Configuring Parallel Apply
Two variables control Parallel Apply in PGD 5: [`bdr.max_writers_per_subscription`](/pgd/latest/reference/pgd-settings#bdrmax_writers_per_subscription) (defaults to 8) and [`bdr.writers_per_subscription`](/pgd/latest/reference/pgd-settings#bdrwriters_per_subscription) (defaults to 2).

```plain
bdr.max_writers_per_subscription = 8
Expand Down Expand Up @@ -44,14 +44,14 @@ WHERE sub_name = 'bdr_bdrdb_bdrgroup_node2_node1';
SELECT bdr.alter_subscription_enable ('bdr_bdrdb_bdrgroup_node2_node1');
```

### When to use parallel apply
### When to use Parallel Apply

Parallel apply is always on by default. For most operations, we recommend that you leave it on.
Parallel Apply is always on by default. For most operations, we recommend that you leave it on.

### When not to use parallel apply
### When not to use Parallel Apply

For PGD 5.1 and earlier, don't use parallel apply with Group Commit, CAMO, and Eager Replication. Disable parallel apply in these scenarios. Also, if you're experiencing a large number of deadlocks, consider disabling it.
For PGD 5.1 and earlier, don't use Parallel aAply with Group Commit, CAMO, and Eager Replication. Disable Parallel Apply in these scenarios. Also, if you're experiencing a large number of deadlocks, consider disabling it.

### Disabling parallel apply
### Disabling Parallel Apply

To disable parallel apply, set [`bdr.writers_per_subscription`](/pgd/latest/reference/pgd-settings#bdrwriters_per_subscription) to `1`.
To disable Parallel Apply, set [`bdr.writers_per_subscription`](/pgd/latest/reference/pgd-settings#bdrwriters_per_subscription) to `1`.

1 comment on commit 25a594f

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.