-
I inherited a project that uses partman_pg and Im currently trying to update the retention policy.
After making that update I then run
but fails with:
I then check the partitions
The partitions are actually in the
I assume that the partition was created in public schema and then migrated to the So the question is, how can I update the pg partman partition to point to Is the best way to solve this is to recreate the partition? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
At this time, pg_partman does not support the parent table existing in a different schema than the child tables. So you can fix this in one of two ways:
How it got like this, I wouldn't be able to tell you. One thing to double-check would be to see if the |
Beta Was this translation helpful? Give feedback.
At this time, pg_partman does not support the parent table existing in a different schema than the child tables. So you can fix this in one of two ways:
x
schema. See theALTER TABLE ... SET SCHEMA ...
command https://www.postgresql.org/docs/15/sql-altertable.html. You will have to do this for every child table. If your application is expecting this table to exist in thex
schema, this is likely the best way to go.public
schema using the sameALTER TABLE
command. This is the technically simpler fix, but you'll then have to ensure anyone using this table knows that the schema changed.How it got like this, I wouldn't be abl…