Skip to content

PostgreSQL: Support ALTER TABLE ATTACH PARTITION - #2749

Merged
LucaCappelletti94 merged 2 commits into
mainfrom
upstream/pg-attach-partition
Oct 28, 2026
Merged

LucaCappelletti94 merged 2 commits into
mainfrom
upstream/pg-attach-partition

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

pg_dump writes every partition as a plain CREATE TABLE followed by ALTER TABLE ONLY root ATTACH PARTITION part FOR VALUES FROM (0) TO (10), and that line failed at ATTACH because only the ClickHouse form was parsed.

https://www.postgresql.org/docs/current/sql-altertable.html

@LucaCappelletti94 LucaCappelletti94 added duplicate This issue or pull request already exists enhancement New feature or request api change and removed duplicate This issue or pull request already exists labels Oct 28, 2026
@codecov-commenter

codecov-commenter commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.25000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.40%. Comparing base (e15e9ab) to head (11f7fa0).

Files with missing lines Patch % Lines
src/ast/spans.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2749   +/-   ##
=======================================
  Coverage   82.40%   82.40%           
=======================================
  Files          42       42           
  Lines       35342    35358   +16     
  Branches    35342    35358   +16     
=======================================
+ Hits        29122    29136   +14     
- Misses       2678     2681    +3     
+ Partials     3542     3541    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@s5dsn-eqee s5dsn-eqee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@LucaCappelletti94
LucaCappelletti94 force-pushed the upstream/pg-attach-partition branch from e5315c6 to 11f7fa0 Compare October 28, 2026 14:51
@LucaCappelletti94

Copy link
Copy Markdown
Contributor Author

Thanks @s5dsn-eqee for the review, I will be merging this one.

cc @alamb (btw I am actively not caring much about the spans test coverage because those are a mess in themselves and will require a refactoring, but not anytime soon)

@LucaCappelletti94
LucaCappelletti94 added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 5989f9c Oct 28, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants