Skip to content

Improve logical replication usability when tables lack primary keys#1227

Merged
gaoxueyu merged 1 commit into
IvorySQL:IVORYSQL_REL_1_STABLEfrom
hs-liuxh:IVORYSQL_REL_1_STABLE
Mar 18, 2026
Merged

Improve logical replication usability when tables lack primary keys#1227
gaoxueyu merged 1 commit into
IvorySQL:IVORYSQL_REL_1_STABLEfrom
hs-liuxh:IVORYSQL_REL_1_STABLE

Conversation

@hs-liuxh
Copy link
Copy Markdown
Collaborator

Logical replication of tables without primary keys automatically falls back to FULL IDENTITY.

  • Introduce a new GUC: logical_replication_fallback_to_full_identity.
  • When enabled, if a table being logically replicated has no primary key,
    the system automatically uses REPLICATION IDENTITY FULL for that table.
  • This setting can be applied at the database level, so large systems do
    not need to enable it cluster-wide unless desired.
  • When the WAL sender transmits relation metadata, if fallback has
    occurred, it explicitly reports FULL as the replication identity to the
    subscriber, so there is limited impact on the subscriber.

This PR implements the new feature. Close #1226

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 17, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ad5b7261-9d48-4bc4-b78f-a1a18382a64b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can enforce grammar and style rules using `languagetool`.

Configure the reviews.tools.languagetool setting to enable/disable rules and categories. Refer to the LanguageTool Community to learn more.

@gaoxueyu gaoxueyu merged commit f8a01f0 into IvorySQL:IVORYSQL_REL_1_STABLE Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants