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

[Bug]: ALTER PROCEDURE ... RENAME TO does not propagate to job metadata #7367

Closed
RobAtticus opened this issue Oct 18, 2024 · 1 comment · Fixed by #7409
Closed

[Bug]: ALTER PROCEDURE ... RENAME TO does not propagate to job metadata #7367

RobAtticus opened this issue Oct 18, 2024 · 1 comment · Fixed by #7409

Comments

@RobAtticus
Copy link
Member

What type of bug is this?

Unexpected error

What subsystems and features are affected?

User-Defined Action (UDA)

What happened?

I created a job using add_job with a custom procedure. I then decided to rename the procedure, but the job metadata info does not get updated, causing the job to fail with cache lookup failed for function 0.

TimescaleDB version affected

2.17.0

PostgreSQL version used

16

What operating system did you use?

Cloud

What installation method did you use?

Other

What platform did you run on?

Timescale Cloud

Relevant log output and stack trace

No response

How can we reproduce the bug?

CREATE OR REPLACE PROCEDURE public.foo(IN job_id INT, IN config jsonb)
  LANGUAGE plpgsql
AS $procedure$
BEGIN
  RAISE NOTICE 'done';
END;
$procedure$;

SELECT add_job('public.foo', schedule_interval=>'1m'::INTERVAL);

ALTER PROCEDURE foo RENAME TO bar;

-- Check timescaledb_information.jobs, proc_name will not be renamed.
@RobAtticus RobAtticus added the bug label Oct 18, 2024
@mkindahl mkindahl self-assigned this Oct 22, 2024
@mkindahl
Copy link
Contributor

An obvious solution would be to store the procedure in the jobs table as a regproc but that does not work since pg_upgrade does not support regproc.

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

Successfully merging a pull request may close this issue.

2 participants