Skip to content
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

Analyzing a Postgres DB with lots of partitioned tables creates seperate tables for each partition #109

Closed
KatamariJr opened this issue Dec 18, 2023 · 3 comments

Comments

@KatamariJr
Copy link

Description of the Issue

Analyzing a Postgres DB with lots of partitioned tables creates separate tables for each partition, making it very hard to work with.

Steps to Reproduce the Issue

  1. Analyze a Postgres database with partitions

Expected Behavior

Analyzing a database that contains tables which have multiple partitions would import a single logical table to work with in Jailer for subsetting. Possibly an analyzation setting to toggle this feature.

Actual Behavior

image
Importing a table with lots of partitions makes individual tables for every partition.

Debug Information

Windows 10, Jailer 15.4, connecting to Postgres 14.9

@Wisser
Copy link
Owner

Wisser commented Dec 19, 2023

Do you use declarative partitioning or partitioning via inheritance?

https://www.postgresql.org/docs/current/ddl-partitioning.html

@Wisser
Copy link
Owner

Wisser commented Dec 19, 2023

I have found a solution for declarative partitioning. Only the partitioned table ("PARTITION BY") is imported, not the partitions ("PARTITION OF").
You can find it here: https://sourceforge.net/projects/jailer/files/stage/

Please try this out.

@KatamariJr
Copy link
Author

This works great! All the tables were found as a single table rather than their partitions. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants