feat: Add pg_partman extension support - #1090
Open
gauthamchandra wants to merge 1 commit into
Open
gauthamchandra wants to merge 1 commit into
gauthamchandra wants to merge 1 commit into
Conversation
gauthamchandra
force-pushed
the
gauthamchandra/pg_partman
branch
2 times, most recently
from
August 24, 2026 23:41
46e00da to
0c04660
Compare
Ports pg_partman 5.5.0 to PGlite as @electric-sql/pglite-pg_partman, following the pgmq package template. pg_partman's core is pure PL/pgSQL, so the WASM bundle is the upstream extension built SQL-only (NO_BGW=1, an officially supported upstream build mode): its background worker is just a scheduler that calls run_maintenance_proc(), and background workers cannot exist in single-process WASM. The embedding application decides when to call run_maintenance() instead. The vitest suite covers the core lifecycle: extension install, time and serial (id) partition creation, premake via run_maintenance(), and retention. **NOTE**: requires the pg_partman dist rule in postgres-pglite; the submodule pointer will be bumped here once that backend PR merges. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Gautham Chandra <gautham.chandra@biltcard.com>
gauthamchandra
force-pushed
the
gauthamchandra/pg_partman
branch
from
September 23, 2026 15:14
0c04660 to
5e4917b
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports pg_partman 5.5.0 to PGlite as
@electric-sql/pglite-pg_partman, following the pgmq package as a template.pg_partman's core is pure PL/pgSQL, so the WASM bundle is the upstream extension built SQL-only (NO_BGW=1, an officially supported upstream build mode): its background worker is just a scheduler that calls run_maintenance_proc(), and background workers cannot exist in single-process WASM. The embedding application decides when to call run_maintenance() instead.
Testing
A vitest suite in
packages/pglite-pg_partman/tests/pg_partman.test.tscovers the core lifecycle: extension install, time and serial (id) partition creation, premake viarun_maintenance(), and retention.The earlier pgTAP layer, which ran upstream's own test files, has been removed per review feedback as overkill for the in-tree suite.
NOTE: requires the pg_partman dist rule in postgres-pglite; the submodule pointer will be bumped here once that backend PR merges.