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

[docs] Add syntax documentation for logical replication #23270

Merged
merged 14 commits into from
Jul 25, 2024

Conversation

dr0pdb
Copy link
Contributor

@dr0pdb dr0pdb commented Jul 24, 2024

No description provided.

@dr0pdb dr0pdb added the area/documentation Documentation needed label Jul 24, 2024
Copy link

netlify bot commented Jul 24, 2024

Deploy Preview for infallible-bardeen-164bc9 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 929c2da
🔍 Latest deploy log https://app.netlify.com/sites/infallible-bardeen-164bc9/deploys/66a227b4dc7fce000892dbb8
😎 Deploy Preview https://deploy-preview-23270--infallible-bardeen-164bc9.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@vaibhav-yb vaibhav-yb requested review from ymahajan and ddhodge July 24, 2024 10:46
Copy link
Contributor

@asrinivasanyb asrinivasanyb left a comment

Choose a reason for hiding this comment

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

USE_SNAPSHOT documentation needs correction

@dr0pdb dr0pdb requested a review from asrinivasanyb July 24, 2024 16:46
Optional value, in the form of a string constant, associated with the specified option.

## Example

Copy link
Contributor

Choose a reason for hiding this comment

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

Add brief summary - "Start replication from Replication Slot test_slot using LSN 0/2 and something something" (explain what is going on)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

Copy link
Contributor

Choose a reason for hiding this comment

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

But what is 'pub'?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

In this example, we probably need a full example? So creating a table, a publication, and then starting replication.
And maybe even show the output of start_replication.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ddorian

Do we need to document these options too https://www.postgresql.org/docs/current/protocol-logical-replication.html ?

So these parameters depend on the output plugin chosen. These parameters are specific to pgoutput. I've added links to the respective documentation for pgoutput, yboutput and wal2json. If the user uses any other plugin, they have to find the documentation for that plugin.

In this example, we probably need a full example? So creating a table, a publication, and then starting replication.
And maybe even show the output of start_replication.

Good point. I've added one. We can't show the output of the start_replication as it streams data via copy protocol. The command doesn't output anything on the shell.

@ddhodge
Copy link
Contributor

ddhodge commented Jul 24, 2024

@ddorian can you take a look

@dr0pdb dr0pdb requested a review from ddorian July 25, 2024 10:26
Copy link
Contributor

@ddorian ddorian left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -38,18 +38,36 @@ The log sequence number from where to start the streaming from.

The name of an option passed to the slot's logical decoding plugin.

The applicable options accepted by the command depends on the output plugin of the replication slot. They can be viewed in the respective documentation of the output plugin itself.

For `pgoutput` and `yboutput`, check the section [53.5.1. Logical Streaming Replication Parameters](https://www.postgresql.org/docs/11/protocol-logical-replication.html) in the PG documentation.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to document somehow yboutput? Or say how/if it differes from pgoutput ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes but not in the syntax section. cc: @asrinivasanyb

@dr0pdb dr0pdb merged commit 3b42c2e into yugabyte:master Jul 25, 2024
2 checks passed
@dr0pdb dr0pdb deleted the syntax_section_cdc branch July 25, 2024 13:06
jasonyb pushed a commit that referenced this pull request Jul 25, 2024
Summary:
 5aa0c0a [PLAT-14078] Add local provider test for update databases
 cdd97f8 remove ea badge (#23276)
 2813d78 [PLAT-14156][PLAT-14323]: Move all UI Driven flags to INTERNAL and remove YBM key as its not used
 49523f5 [PLAT-14733]: Add support for OIDC attributes jwt_jwks_path and jwt_jwks_url
 b039d1a [PLAT-14366] Basic local provider test for master auto failover
 700fd49 [#23275] docdb: Fix missing home icon on master UI
 89e434e [#13254] YSQL: import pgtap v1.3.3
 1b3585f [doc][cdc] Updated diagrams (#23262)
 399f165 [#23266] YSQL: Only require YB Admin privileges to run pg_locks
 5a4bbd4 [#19954] docdb: Register both tablet split children atomically
 b4c4294 [PLAT-14617] Add support for numerical search and enable extra search fields forxCluster
 84fb7ad [#22449] YSQL: wal2json YB specific changes
 afe84d4 [#13254] YSQL: add pgtap to build
 adf3c54 [#23272] YSQL, ASH: Fix incorrect popping of query id from nested query ids stack
 3b42c2e [docs] Add syntax documentation for logical replication (#23270)

Test Plan: Jenkins: rebase: pg15-cherrypicks

Reviewers: jason, tfoucher

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D36841
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Documentation needed
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants