-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Partitioning Support in Doctrine for Relational Database #4657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm looking for this feature ! |
I don't think we can just add a platform-specific feature to the DBAL API. Even if partitioning is supported by multiple platforms, there are high chances that their APIs and capabilities are different. The only reasonable way to support features like this is to break the Platform API down to smaller pieces and make them extensible independently. Something along the lines documented in #3731. |
I second this! Horizontal partitioning is a powerful feature for large datasets where newer entries are accessed more frequently than older entries. Sales pitch aside, I also am an advocate for #3731 as this opens a door to exploring platform specific features, and to my knowledge has no downsides (much like how Symfony is structured). |
Also this isn't PostgreSQL specific, MySQL/MariaDB supports this too. |
Hi, we need this too. Is there a workaround we can implement (in code) in the meantime, to get |
Hello, we need this too. Its important feature! |
Go ahead and build that feature, then. |
Rather than being sarcastic, maybe there is some guidelines, how we can approach this? |
Nobody's being sarcastic. This is a community-driven open source project. If you want a change to happen, make it happen. |
Hello, maybe at least we could make the dbal see "partiioned" table, and ignore "partitions"? this would allow to work with manually partitioned tables as doctrine would consider them as normal tables, and would not suggest to remove partitions see #6516 |
<!-- Fill in the relevant information below to help triage your pull request. --> | Q | A |------------- | ----------- | Type | improvement Partitioned tables is a complex topic which [is not fully supported by Doctrine](#4657). Currently, with PostgreSQL, Doctrine does not "see" partitioned tables, and only "sees" partitions, which is problematic and should be done the other way. This PR fixes this in `PostgreSQLSchemaManager::selectTableColumns()`. **Before this PR:** - does not see at all "partitioned tables" (which are the actual tables related to an entity) - doctrine suggest to remove all "partitions" **After this PR:** - `doctrine:schema:validate` is happy, even if tables have been partitioned manually see #4657 (comment) Note: I'd want to see if maintainers folks are willing to accept such modification before digging into the tests for this
@nikophil Well done, thanks! |
Partitioning Support in Doctrine for Relational Databases
Summary
Request a support for partitioning support in native doctrine.
https://www.postgresql.org/docs/12/ddl-partitioning.html
Main Challenge in implementing partitioning currently is, partitioning needs to be defined while create table itself.
Currently as the option is not available we cannot use same
From Postgres Documentation:
_It is not possible to turn a regular table into a partitioned table or vice versa. However, it is possible to add an existing regular or partitioned table as a partition of a partitioned table, or remove a partition from a partitioned table turning it into a standalone table. Link
Similar to index or unique constraint support we can have partitioning column support too for Databases.
Like partition_option({"type": "range", column: "date", max_partition: 40})
The text was updated successfully, but these errors were encountered: