Skip to content

Is there any way to partition table by foreign key? #179

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

Closed
kesavkolla opened this issue Sep 29, 2018 · 1 comment
Closed

Is there any way to partition table by foreign key? #179

kesavkolla opened this issue Sep 29, 2018 · 1 comment

Comments

@kesavkolla
Copy link

I've a huge table where the data is partitioned by foreign key. Here is my structure of tables:

CREATE TABLE store(id uuid, name text);
CREATE TABLE transactions(store uuid REFERENCES store(id), snapshotdate timestamp, trandate date, tranuser text);

I want the transactions table should have partitions based on store(id). How can I use pg_pathman for this?

@ildus
Copy link
Collaborator

ildus commented Oct 8, 2018

On #148 was some discussion related with foreign keys, basically we don't support them on partitions.

@ildus ildus closed this as completed Oct 15, 2018
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