Skip to content

Place listed tables in an attached database and initialize each fresh file - #135

Merged
LucaCappelletti94 merged 1 commit into
mainfrom
upstream/attached-placement
Oct 22, 2026
Merged

LucaCappelletti94 merged 1 commit into
mainfrom
upstream/attached-placement

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Collaborator

with_attached_tables stores the listed tables in a database attached to the replica's connection. A permanent SQLite view or trigger can only name objects in its own database, so every view or trigger that reads attached storage, directly or through another view, is emitted TEMP. Foreign keys across the two files, renames to or from a listed name and writes SQLite cannot place are refused with Error::UnusableAttachedTables. translation_manifest reports where each logical and physical table lives.

A connection creating the files runs Script::initialize. FreshFiles::Both runs everything in source order. FreshFiles::Main and FreshFiles::Attached initialize one new file next to an existing one. The statements that file needs run in source order with their transaction controls, and references to objects in the other file use their final names. Each selection is checked when the script is built, and a selection that needs history the existing file has lost fails on its own with an InitializationError while the others stay usable. Script::main becomes Script::files.

This replaces #129 and is stacked on #134.

@LucaCappelletti94
LucaCappelletti94 added this pull request to stack #136 October 21, 2026 07:15
@LucaCappelletti94 LucaCappelletti94 added enhancement New feature or request rust Pull requests that update rust code labels Oct 21, 2026
@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

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
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 1b6976a6-6d56-484d-ac36-7b15cd0365e6

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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@LucaCappelletti94
LucaCappelletti94 force-pushed the upstream/attached-placement branch from 19b08d1 to acf22c3 Compare October 22, 2026 13:06
@sonarqubecloud

Copy link
Copy Markdown

@LucaCappelletti94
LucaCappelletti94 removed this pull request from stack #136 October 22, 2026 18:21
@LucaCappelletti94
LucaCappelletti94 added this pull request to stack #138 October 22, 2026 18:21
@LucaCappelletti94
LucaCappelletti94 force-pushed the upstream/attached-placement branch from acf22c3 to c331dcd Compare October 22, 2026 18:25
Base automatically changed from upstream/connection-history to main October 22, 2026 19:52
@LucaCappelletti94
LucaCappelletti94 force-pushed the upstream/attached-placement branch from c331dcd to 480a0e5 Compare October 22, 2026 19:52
@LucaCappelletti94
LucaCappelletti94 merged commit 624a06c into main Oct 22, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant