Part of the Wolverine conjoined EF Core multi-tenancy epic (JasperFx/wolverine#3465).
ManagedTenantPartitions (built for Polecat's UseTenantPartitionedEvents, #301) is currently applied to a single table per store. The Wolverine conjoined EF Core tenancy epic and the Polecat document/streams partitioning follow-up will apply it across many tables per application, and CritterWatch tenant management (add/remove/hard-delete) will drive it at runtime. Before that, close the gaps against the mature Postgres ManagedListPartitions feature set:
Gaps
-
Data-removing drop semantics. Postgres managed drop is DETACH PARTITION [CONCURRENTLY] + DROP TABLE — the tenant's rows are physically removed. SQL Server's DropPartitionFromAllTables issues ALTER PARTITION FUNCTION … MERGE RANGE, which removes the boundary but merges the tenant's rows into the neighboring partition. Removing a tenant should (at least optionally) delete that tenant's rows before merging, or the contract must clearly state the caller owns the purge. Needed for CritterWatch RemoveTenant/hard-delete parity on SQL Server.
-
Tenant bucketing (many tenants → one partition). Postgres partition_value → partition_suffix mapping is many-to-one by design, so small tenants can share a partition. SQL Server ordinal allocation is strictly max + 1 per tenant with no sharing. Add optional explicit ordinal assignment on add (AddPartitionToAllTables(tenantId, ordinal)-shaped) so multiple tenant ids can map to one ordinal/partition. This is also the mitigation for SQL Server's 15,000-partition ceiling.
-
New-table back-fill under migration. The Postgres additive path has explicit handling so a table newly wired to an existing ManagedListPartitions gets all existing partitions created. TableDelta on SQL Server deliberately skips managed strategies — verify (and cover with tests) that a table newly added to an existing managed set is split for all existing tenant ordinals when migrated.
-
Batch add / status reporting parity. Postgres batch AddPartitionToAllTables(logger, database, dictionary) returns TablePartitionStatus[] per table. Confirm the SQL Server overloads report equivalent per-table status so callers (Wolverine, Polecat, CritterWatch) can surface partial failures.
No change proposed for disabled-tenant awareness — tenant lifecycle state deliberately stays in the consuming library's registry, not Weasel's partition control tables.
Part of the Wolverine conjoined EF Core multi-tenancy epic (JasperFx/wolverine#3465).
ManagedTenantPartitions(built for Polecat'sUseTenantPartitionedEvents, #301) is currently applied to a single table per store. The Wolverine conjoined EF Core tenancy epic and the Polecat document/streams partitioning follow-up will apply it across many tables per application, and CritterWatch tenant management (add/remove/hard-delete) will drive it at runtime. Before that, close the gaps against the mature PostgresManagedListPartitionsfeature set:Gaps
Data-removing drop semantics. Postgres managed drop is
DETACH PARTITION [CONCURRENTLY]+DROP TABLE— the tenant's rows are physically removed. SQL Server'sDropPartitionFromAllTablesissuesALTER PARTITION FUNCTION … MERGE RANGE, which removes the boundary but merges the tenant's rows into the neighboring partition. Removing a tenant should (at least optionally) delete that tenant's rows before merging, or the contract must clearly state the caller owns the purge. Needed for CritterWatchRemoveTenant/hard-delete parity on SQL Server.Tenant bucketing (many tenants → one partition). Postgres
partition_value → partition_suffixmapping is many-to-one by design, so small tenants can share a partition. SQL Server ordinal allocation is strictlymax + 1per tenant with no sharing. Add optional explicit ordinal assignment on add (AddPartitionToAllTables(tenantId, ordinal)-shaped) so multiple tenant ids can map to one ordinal/partition. This is also the mitigation for SQL Server's 15,000-partition ceiling.New-table back-fill under migration. The Postgres additive path has explicit handling so a table newly wired to an existing
ManagedListPartitionsgets all existing partitions created.TableDeltaon SQL Server deliberately skips managed strategies — verify (and cover with tests) that a table newly added to an existing managed set is split for all existing tenant ordinals when migrated.Batch add / status reporting parity. Postgres batch
AddPartitionToAllTables(logger, database, dictionary)returnsTablePartitionStatus[]per table. Confirm the SQL Server overloads report equivalent per-table status so callers (Wolverine, Polecat, CritterWatch) can surface partial failures.No change proposed for disabled-tenant awareness — tenant lifecycle state deliberately stays in the consuming library's registry, not Weasel's partition control tables.