Skip to content

Commit

Permalink
Merge pull request #6081 from EnterpriseDB/docs/pgd/fix/missing_refer…
Browse files Browse the repository at this point in the history
…ences_to_bdr_lock_table_locking

Added reference, converted to tables, added defaults
  • Loading branch information
djw-m authored Sep 20, 2024
2 parents 96ec991 + 95171d3 commit 3777cc6
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 15 deletions.
1 change: 1 addition & 0 deletions product_docs/docs/pgd/5/reference/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
"bdrglobal_lock_timeout": "/pgd/latest/reference/pgd-settings#bdrglobal_lock_timeout",
"bdrglobal_lock_statement_timeout": "/pgd/latest/reference/pgd-settings#bdrglobal_lock_statement_timeout",
"bdrglobal_lock_idle_timeout": "/pgd/latest/reference/pgd-settings#bdrglobal_lock_idle_timeout",
"bdrlock_table_locking": "/pgd/latest/reference/pgd-settings#bdrlock_table_locking",
"bdrpredictive_checks": "/pgd/latest/reference/pgd-settings#bdrpredictive_checks",
"bdrreplay_progress_frequency": "/pgd/latest/reference/pgd-settings#bdrreplay_progress_frequency",
"bdrstandby_slot_names": "/pgd/latest/reference/pgd-settings#bdrstandby_slot_names",
Expand Down
1 change: 1 addition & 0 deletions product_docs/docs/pgd/5/reference/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ The reference section is a definitive listing of all functions, views, and comma
* [`bdr.global_lock_timeout`](pgd-settings#bdrglobal_lock_timeout)
* [`bdr.global_lock_statement_timeout`](pgd-settings#bdrglobal_lock_statement_timeout)
* [`bdr.global_lock_idle_timeout`](pgd-settings#bdrglobal_lock_idle_timeout)
* [`bdr.lock_table_locking`](pgd-settings#bdrlock_table_locking)
* [`bdr.predictive_checks`](pgd-settings#bdrpredictive_checks)
### [Node management](pgd-settings#node-management)
* [`bdr.replay_progress_frequency`](pgd-settings#bdrreplay_progress_frequency)
Expand Down
41 changes: 26 additions & 15 deletions product_docs/docs/pgd/5/reference/pgd-settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@ identify rows that are updated or deleted.

The accepted values are:

- `default` — Records the old values of the columns of the primary key,
if any (this is the default PostgreSQL behavior).
- `full` — Records the old values of all columns in the row.
- `nothing` — Records no information about the old row.
- `auto` — Tables with PK are created with REPLICA IDENTITY DEFAULT,
and tables without PK are created with REPLICA IDENTITY FULL. This is
the default PGD behavior.
| Value | Description |
|---|---|
| `default` | Records the old values of the columns of the primary key, if any (this is the default PostgreSQL behavior). |
| `full` | Records the old values of all columns in the row. |
| `nothing` | Records no information about the old row. |
| `auto` | Tables with PK are created with REPLICA IDENTITY DEFAULT, and tables without PK are created with REPLICA IDENTITY FULL. This is the default PGD behavior. |

See the [PostgreSQL documentation](https://www.postgresql.org/docs/current/sql-altertable.html#SQL-CREATETABLE-REPLICA-IDENTITY) for more details.

Expand Down Expand Up @@ -105,10 +104,13 @@ This parameter can be set only by bdr_superuser or superuser roles.

Possible options are:

- `all` — Use global locking for all DDL operations.
- `dml` — Use global locking only for DDL operations that need to prevent
writes by taking the global DML lock for a relation.
- `off` — Don't use global locking for DDL operations.
| Value | Description |
| --- | --- |
| `all` | Use global locking for all DDL operations. (Default) |
| `dml` | Use global locking only for DDL operations that need to prevent writes by taking the global DML lock for a relation. |
| `off` | Don't use global locking for DDL operations. |

Default is `all`.

A `LOG`-level log message is emitted to the PostgreSQL server logs whenever
`bdr.ddl_replication` is set to `off`. Additionally, a `WARNING` message is
Expand Down Expand Up @@ -152,6 +154,15 @@ Sets the maximum allowed duration of any statement holding a global lock
Sets the maximum allowed duration of idle time in a transaction holding a global
lock (default is 10 minutes). A value of zero disables this timeout.

### `bdr.lock_table_locking`

Defaults to off. This configuration option sets locking behavior for LOCK TABLE Statement; when enabled, LOCK TABLE statement will also take a global DML lock on the cluster, blocking other locking statements.

| Value | Description |
| --- | --- |
| `on` | Use global locking for all table locks. |
| `off` | Don't use global locking for table locks. (Default) |

### `bdr.predictive_checks`

Sets the log level for predictive checks (currently used only by global locks).
Expand Down Expand Up @@ -252,10 +263,10 @@ Specifies the action to take if a clock skew higher than

There are two possible values for this setting:

- `WARN` — Log a warning about this fact. The warnings are logged once
per minute (the default) at the maximum to prevent flooding the server log.
- `WAIT` — Wait until the current local timestamp is no longer older
than remote commit timestamp minus the `bdr.maximum_clock_skew`.
| Value | Description |
| --- | --- |
| `WARN` | Log a warning about this fact. The warnings are logged once per minute at the maximum to prevent flooding the server log. |
| `WAIT` | Wait until the current local timestamp is no longer older than remote commit timestamp minus the `bdr.maximum_clock_skew`. |

### `bdr.accept_connections`

Expand Down

1 comment on commit 3777cc6

@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.