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

Allow pg_partman to be installed in any schema #310

Merged
merged 9 commits into from
Sep 16, 2024
Merged

Conversation

olirice
Copy link
Contributor

@olirice olirice commented Sep 16, 2024

Allows pg_partman to be installed in any schema vs hard-coded to public

New Functions

  • pgmq._get_pg_partman_schema()

Updated Functions

  • pgmq.drop_queue
  • pgmq.create_partitioned
  • pgmq.convert_archive_partitioned

Resolves #306

Copy link
Contributor

@theory theory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think pg_partman is relocatable, so in theory we could set search_path in the [CREATE FUNCTION] statements — or just get the schema name at install time and compile it into the functions. But that's probably more of a PITA than it's worth.

@olirice
Copy link
Contributor Author

olirice commented Sep 16, 2024

agreed

Since its an optional dependency, pg_partman could be installed after pgmq. In that case install-time interpolation wouldn't be an option.

@ChuckHend
Copy link
Contributor

@olirice , thanks again for this work. 1.4.3 has not yet been released. Did you want this to go out in a separate patch? I'll release 1.4.3 quick if this needs to be in 1.4.4, otherwise could we put the migration sql in https://github.com/tembo-io/pgmq/blob/main/pgmq-extension/sql/pgmq--1.4.2--1.4.3.sql?

@olirice
Copy link
Contributor Author

olirice commented Sep 16, 2024

No preference from me if you'd prefer to put them together. Separate PRs was only for review-ability

@ChuckHend ChuckHend merged commit 9787166 into tembo-io:main Sep 16, 2024
15 of 18 checks passed
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

Successfully merging this pull request may close these issues.

pg_partman assumed to be in the public schema
3 participants