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

partition_data_* functions/procedures do not work when target and source are in different schemas #726

Open
keithf4 opened this issue Dec 30, 2024 · 1 comment

Comments

@keithf4
Copy link
Collaborator

keithf4 commented Dec 30, 2024

Something with the show_partition_info is grabbing the schema for the source table and trying to apply it to the target table as well. Likely because I'm using the parent_schemaname in both places

keith@github724=# call partman.partition_data_proc('pgmq.untitled', p_source_table := 'public.source_untitled', p_ignored_columns := ARRAY['msg_id']);
ERROR:  Child table given does not exist (public.untitled_p20250103) for given parent table (pgmq.untitled)
CONTEXT:  PL/pgSQL function partman.show_partition_info(text,text,text) line 37 at RAISE
SQL statement "SELECT child_start_time                                FROM partman.show_partition_info(v_source_schemaname||'.'||v_last_partition
        , v_partition_interval::text
        , p_parent_table)"
PL/pgSQL function partman.partition_data_time(text,integer,interval,numeric,text,boolean,text,text[]) line 153 at SQL statement
SQL statement "SELECT partman.partition_data_time (p_parent_table := 'pgmq.untitled', p_lock_wait := '0', p_order := 'ASC', p_analyze := false, p_source_table := 'public.source_untitled', p_ignored_columns := '{msg_id}')"
PL/pgSQL function partman.partition_data_proc(text,integer,text,integer,integer,integer,text,text,text[],boolean) line 86 at EXECUTE
Time: 12.464 ms
@keithf4 keithf4 self-assigned this Dec 30, 2024
@keithf4 keithf4 added this to the Next Patch milestone Dec 30, 2024
@keithf4
Copy link
Collaborator Author

keithf4 commented Dec 31, 2024

Was actually just a typo in partition_data_time

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

No branches or pull requests

1 participant