Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgd: document node synchronisation catalogue objects #6321

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions product_docs/docs/pgd/5.6/reference/catalogs-internal.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,42 @@ An internal state table storing the type of each non-local sequence. We recommen
|---------|------|-----------------------------------------------------------------------------|
| seqid | oid | Internal OID of the sequence |
| seqkind | char | Internal sequence kind (`l`=local,`t`=timeshard,`s`=snowflakeid,`g`=galloc) |


### `bdr.sync_node_requests`

An internal state table storing the state of node synchronization requests. The view
[`bdr.sync_node_requests_summary`](catalogs-internal#bdrsync_node_requests_summary)
provides a human-readable representation of this table.

### `bdr.sync_node_requests` columns

| Name | Type | Description |
| ----------------- | ----------- | ------------------------------------------------- |
| sn_origin_node_id | oid | Unavailable node with changes to be synchronized |
| sn_target_node_id | oid | Node with the origin node's changes |
| sn_source_node_id | oid | Target node for the sync request |
| sn_sync_start_lsn | pg_lsn | Start LSN of the sync request |
| sn_sync_start_ts | timestamptz | Start timestamp of the sync request |
| sn_sync_end_lsn | pg_lsn | End LSN of the sync request |
| sn_sync_end_ts | timestamptz | End timestamp of the sync request |
| sn_sync_status | text | Status of the sync request |

### `bdr.sync_node_requests_summary`

A view providing a human-readable version of the underlying [`bdr.sync_node_requests`](catalogs-internal#bdrsync_node_requests)
table.

#### `bdr.sync_node_requests_summary` columns

| Name | Type | Description |
| -------------- | ----------- | ------------------------------------------------- |
| origin | text | Unavailable node with changes to be synchronized |
| source | text | Node with the origin node's changes |
| target | text | Target node for the sync request |
| sync_start_lsn | pg_lsn | Start LSN of the sync request |
| sync_start_ts | timestamptz | Start timestamp of the sync request |
| sync_end_lsn | pg_lsn | End LSN of the sync request |
| sync_end_ts | timestamptz | End timestamp of the sync request |
| sync_status | text | Status of the sync request |

20 changes: 19 additions & 1 deletion product_docs/docs/pgd/5.6/reference/functions-internal.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,24 @@ bdr.show_workers(

Function used in the `bdr.writers` view.

### `bdr.sync_status_name`

Converts sync state code into a textual representation.
Used mainly to implement the [`bdr.sync_node_requests_summary`](catalogs-internal#bdrsync_node_requests_summary)
view.

#### Synopsis

```sql
bdr.sync_status_name(sync_state oid)
```

#### Parameters

| Parameter | Description |
|--------------|-------------------------------|
| `sync_state` | Oid code of the sync state. |

## Task manager functions

### `bdr.taskmgr_set_leader`
Expand Down Expand Up @@ -528,4 +546,4 @@ Internal function used when generating view `bdr.group_versions_details`. Do not

### `bdr.node_group_member_info`

Internal function used when generating view `bdr.group_raft_details`. Do not use directly. Use the [`bdr.group_raft_details`](/pgd/latest/reference/catalogs-visible#bdrgroup_raft_details) view instead.
Internal function used when generating view `bdr.group_raft_details`. Do not use directly. Use the [`bdr.group_raft_details`](/pgd/latest/reference/catalogs-visible#bdrgroup_raft_details) view instead.
Loading