Skip to content

Bugfix: do not skip LOLOR extension and schema from Spock replication#494

Open
danolivo wants to merge 1 commit into
mainfrom
spoc-583
Open

Bugfix: do not skip LOLOR extension and schema from Spock replication#494
danolivo wants to merge 1 commit into
mainfrom
spoc-583

Conversation

@danolivo

@danolivo danolivo commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Spock keeps two static deny-lists, skip_schema and skip_extension (src/spock_node.c), that name schemas and extensions whose relations are never replicated. Any object in those lists is rejected from replication sets by EnsureRelationNotIgnored(), and is excluded from the initial subscription sync via --exclude-schema / --exclude-extension flags passed to pg_dump (build_exclude_schema_string() / build_exclude_extension_string() in src/spock_sync.c).

lolor was wrongly listed in both arrays. That directly contradicts the purpose of the LOLOR extension: it relocates large objects out of the catalog into ordinary tables (lolor.pg_largeobject, lolor.pg_largeobject_metadata) precisely so they can be logically replicated, and the lolor docs instruct users to add those tables to their replication set. With lolor on the deny-lists, that documented step failed and large objects were silently skipped during initial sync.

This change removes "lolor" from both skip_schema and skip_extension.

Effect

  • EnsureRelationNotIgnored() no longer rejects lolor.pg_largeobject and lolor.pg_largeobject_metadata when they are added to a replication set, so the documented repset-add-table workflow now works.
  • The initial Spock sync no longer passes --exclude-schema=lolor / --exclude-extension=lolor to pg_dump, so existing large objects are copied to the replica.

Notes

We cannot automatically add an arbitrary extension's objects to a subscription, so manual addition of the two lolor tables to the replication set still stands as the supported workflow. snowflake and spock remain on the deny-lists; only lolor is removed.

…tion

We can't automatically add an arbitrary extension's objects into a subscription
(but can try to do this for LOLOR solely). So, manual addition stands. But
anyway, initial Spock sync should copy LOs to replica.
@danolivo danolivo self-assigned this Jun 9, 2026
@danolivo danolivo added the bug Something isn't working label Jun 9, 2026
@danolivo danolivo requested a review from mason-sharp June 9, 2026 13:48
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 82b8883f-0cfa-47b3-b2d7-ed97ef533584

📥 Commits

Reviewing files that changed from the base of the PR and between 94f4ad6 and a05a771.

📒 Files selected for processing (1)
  • src/spock_node.c
💤 Files with no reviewable changes (1)
  • src/spock_node.c

📝 Walkthrough

Walkthrough

The pull request removes the "lolor" schema from the skip_schema global list in src/spock_node.c. This list identifies schemas that should be skipped during replication set validation. After the change, only "snowflake" and "spock" remain in the skip list.

Changes

Schema skip list update

Layer / File(s) Summary
Remove lolor from skip_schema list
src/spock_node.c
The skip_schema initializer removes the "lolor" entry, leaving "snowflake" and "spock" schemas before the sentinel.

Poem

🐰 A schema removed, so tidy and clean,
The lolor departs from the skip-list scene,
Just snowflake and spock remain standing tall,
Replication flows smoother for all! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: removing the 'lolor' entry from Spock's replication deny-lists to allow LOLOR extension support.
Description check ✅ Passed The description is detailed and directly related to the changeset, explaining the rationale for removing 'lolor' from both skip_schema and skip_extension arrays.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch spoc-583

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.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant