Skip to content

Running run_maintenance fails when table was migrated to a new db schema #553

Closed Answered by keithf4
Rapol asked this question in Q&A
Discussion options

You must be logged in to vote

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:

  1. Move all the child tables into the x schema. See the ALTER 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 the x schema, this is likely the best way to go.
  2. Move the parent table to the public schema using the same ALTER 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…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Rapol
Comment options

Answer selected by Rapol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants