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

pg_partman upgrade issue. #712

Open
Santoshkumar00723 opened this issue Nov 30, 2024 · 16 comments
Open

pg_partman upgrade issue. #712

Santoshkumar00723 opened this issue Nov 30, 2024 · 16 comments

Comments

@Santoshkumar00723
Copy link

Trying to upgrade partman version from 4.7.3 to 5.2.0 but getting below error.

Did i miss any step ?

$ rpm -qa | grep partman
pg_partman_15-5.2.0-1PGDG.rhel9.x86_64

SELECT * FROM pg_available_extensions where name ='pg_partman';
name | default_version | installed_version | comment
------------+-----------------+-------------------+------------------------------------------------------
pg_partman | 5.2.0 | | Extension to manage partitioned tables by time or ID

ALTER EXTENSION pg_partman UPDATE TO '5.2.0';

WARNING: One or more partition sets are configured for quarterly or ISO weekly partitioning which is not supported in version 5.0.0 or greater. See documentation for migrating to standard intervals. This migration can and should be done after upgrading to ensure new partition suffixes are used.
ERROR: syntax error at or near "DECLARE"

I can able to update the extension to 5.0.0 but not 5.2.0

ALTER EXTENSION pg_partman UPDATE TO '5.0.0';

WARNING: One or more partition sets are configured for quarterly or ISO weekly partitioning which is not supported in version 5.0.0 or greater. See documentation for migrating to standard intervals. This migration can and should be done after upgrading to ensure new partition suffixes are used.
ALTER EXTENSION

SELECT * FROM pg_available_extensions where name ='pg_partman';

name    | default_version | installed_version |                       comment

------------+-----------------+-------------------+------------------------------------------------------
pg_partman | 5.2.0 | 5.0.0 | Extension to manage partitioned tables by time or ID

ALTER EXTENSION pg_partman UPDATE TO '5.2.0';
ERROR: syntax error at or near "DECLARE"

@keithf4
Copy link
Collaborator

keithf4 commented Nov 30, 2024

This is a known issue. I'll try and have a fix out next week

#711

I have a PR up with a fix if you'd like to test on a non-production system. Note this may not be the final update for 5.2.1, so please don't install this PR on a production system.

#713

@keithf4 keithf4 self-assigned this Nov 30, 2024
@Santoshkumar00723
Copy link
Author

Santoshkumar00723 commented Nov 30, 2024

#713

Please let me know once the issue is fixed. We are planning to upgrade the partman to 5.2.0.

I was able to update the version to 5.0.0. Can I test the other scenarios using this or we have to wait until bug fix appleid ?

@keithf4
Copy link
Collaborator

keithf4 commented Dec 2, 2024

Update has been released. Please let me know if it's working ok for you.

@Santoshkumar00723
Copy link
Author

Update has been released. Please let me know if it's working ok for you.

Thanks for the update. will check and let you know

@Santoshkumar00723
Copy link
Author

Santoshkumar00723 commented Dec 4, 2024

Update has been released. Please let me know if it's working ok for you.

Is update released on this pg_partman_15-5.2.0-1PGDG.rhel9.x86_64.rpm ? If there is any separate link pls reply.

https://download.postgresql.org/pub/repos/yum/15/redhat/rhel-9-x86_64/pg_partman_15-5.2.0-1PGDG.rhel9.x86_64.rpm

@keithf4
Copy link
Collaborator

keithf4 commented Dec 4, 2024

It should be 5.2.1. That appears to still be 5.2.0. And looking at the timestamp, it's still from Nov 23

pg_partman_15-5.2.0-1PGDG.rhel9.x86_64.rpm         23-Nov-2024 16:34              210569

@Santoshkumar00723
Copy link
Author

Santoshkumar00723 commented Dec 6, 2024

It should be 5.2.1. That appears to still be 5.2.0. And looking at the timestamp, it's still from Nov 23

pg_partman_15-5.2.0-1PGDG.rhel9.x86_64.rpm         23-Nov-2024 16:34              210569

still I am unable to 5.2.1 on official link. Could you please us know when it will be updated.

pg_partman_15-5.0.0-1PGDG.rhel9.x86_64.rpm 02-Jan-2024 16:49 201958
pg_partman_15-5.0.1-1PGDG.rhel9.x86_64.rpm 23-Jan-2024 18:47 202664
pg_partman_15-5.1.0-1PGDG.rhel9.x86_64.rpm 08-Apr-2024 10:02 206647
pg_partman_15-5.2.0-1PGDG.rhel9.x86_64.rpm 23-Nov-2024 16:34 210569

@keithf4
Copy link
Collaborator

keithf4 commented Dec 6, 2024

I have no control of the packaging at this time. That is managed by the RHEL repository maintainer.

https://www.postgresql.org/list/pgsql-pkg-yum/

@Santoshkumar00723
Copy link
Author

Santoshkumar00723 commented Dec 9, 2024

I have no control of the packaging at this time. That is managed by the RHEL repository maintainer.

https://www.postgresql.org/list/pgsql-pkg-yum/

RHEL repository also got updated I can see the the package. will work on upgrade and update you if any issue.

pg_partman_15-5.2.1-1PGDG.rhel9.x86_64.rpm 06-Dec-2024 10:34

@Santoshkumar00723
Copy link
Author

Santoshkumar00723 commented Dec 9, 2024

I have installed partman 5.2.1 package and Post partman upgrade to 5.2.1 getting below error message when partman.run_maintenance triggered.

Hourly maintenance failed for all of the tables.

                           List of installed extensions
Name    | Version |   Schema   |                     Description

------------+---------+------------+------------------------------------------------------
pg_partman | 5.1.0 | partman | Extension to manage partitioned tables by time or ID
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
(2 rows)

=# ALTER EXTENSION pg_partman UPDATE TO '5.2.1';
ALTER EXTENSION
=# \dx
List of installed extensions
Name | Version | Schema | Description
------------+---------+------------+------------------------------------------------------
pg_partman | 5.2.1 | partman | Extension to manage partitioned tables by time or ID
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
(2 rows)

-----------------------------###############################-------------------------------------------------

2024-12-09 14:41:04 GMT [3586633-1] LOG: pg_partman dynamic background worker (dbname=salestaxhub_staging) dynamic background worker initialized with role postgres on database salestaxhub_staging
2024-12-09 14:41:04 GMT [3586633-2] ERROR: column "time_encoder" does not exist
CONTEXT: PL/pgSQL function partman.run_maintenance(text,boolean,boolean) line 130 at SQL statement
SQL statement "SELECT partman.run_maintenance('test.premake_test', p_jobmon := 't', p_analyze := 'f')"
PL/pgSQL function partman.run_maintenance_proc(integer,boolean,boolean) line 42 at EXECUTE
SQL statement "CALL partman.run_maintenance_proc(p_wait => 0, p_analyze => false, p_jobmon => true)"
DETAIL:
HINT:
2024-12-09 14:41:04 GMT [3586633-3] CONTEXT: PL/pgSQL function partman.run_maintenance(text,boolean,boolean) line 474 at RAISE
SQL statement "SELECT partman.run_maintenance('test.premake_test', p_jobmon := 't', p_analyze := 'f')"
PL/pgSQL function partman.run_maintenance_proc(integer,boolean,boolean) line 42 at EXECUTE
SQL statement "CALL partman.run_maintenance_proc(p_wait => 0, p_analyze => false, p_jobmon => true)"
2024-12-09 14:41:04 GMT [2881064-23] LOG: background worker "pg_partman background worker" (PID 3586633) exited with exit code 1
2024-12-09 14:41:04 GMT [3586634-1] LOG: pg_partman dynamic background worker (dbname=salestaxhub_main) dynamic background worker initialized with role postgres on database salestaxhub_main
2024-12-09 14:41:04 GMT [3586634-2] ERROR: column "time_encoder" does not exist
CONTEXT: PL/pgSQL function partman.run_maintenance(text,boolean,boolean) line 130 at SQL statement
SQL statement "SELECT partman.run_maintenance('main.order_header', p_jobmon := 't', p_analyze := 'f')"
PL/pgSQL function partman.run_maintenance_proc(integer,boolean,boolean) line 42 at EXECUTE
SQL statement "CALL partman.run_maintenance_proc(p_wait => 0, p_analyze => false, p_jobmon => true)"
DETAIL:
HINT:
2024-12-09 14:41:04 GMT [3586634-3] CONTEXT: PL/pgSQL function partman.run_maintenance(text,boolean,boolean) line 474 at RAISE
SQL statement "SELECT partman.run_maintenance('main.order_header', p_jobmon := 't', p_analyze := 'f')"
PL/pgSQL function partman.run_maintenance_proc(integer,boolean,boolean) line 42 at EXECUTE
SQL statement "CALL partman.run_maintenance_proc(p_wait => 0, p_analyze => false, p_jobmon => true)"
2024-12-09 14:41:04 GMT [2881064-24] LOG: background worker "pg_partman background worker" (PID 3586634) exited with exit code 1

I have tried to run it manually. i got this error message.

=# SELECT partman.run_maintenance();
ERROR: column "time_encoder" does not exist
CONTEXT: PL/pgSQL function partman.run_maintenance(text,boolean,boolean) line 130 at SQL statement
DETAIL:
HINT:
CONTEXT: PL/pgSQL function partman.run_maintenance(text,boolean,boolean) line 474 at RAISE

@keithf4
Copy link
Collaborator

keithf4 commented Dec 9, 2024

Yes, someone else reported this. I'm looking into it. Will hopefully have a fix out soon. Thank you for testing!

#718

@Santoshkumar00723
Copy link
Author

Yes, someone else reported this. I'm looking into it. Will hopefully have a fix out soon. Thank you for testing!

#718

thanks for the update.

@keithf4
Copy link
Collaborator

keithf4 commented Dec 10, 2024

Version 5.2.2 has been tagged and released. Will have to wait until the package maintainers pick it up if you need a package for it.

@Santoshkumar00723
Copy link
Author

Version 5.2.2 has been tagged and released. Will have to wait until the package maintainers pick it up if you need a package for it.

thanks for the update. I think it may take time to update in RHEL repository

@Santoshkumar00723
Copy link
Author

Version 5.2.2 has been tagged and released. Will have to wait until the package maintainers pick it up if you need a package for it.

thanks for the update. I think it may take time to update in RHEL repository

I can see the latest package is available for RHEL 8 but RHEL 9 it's not updated.

image

@keithf4
Copy link
Collaborator

keithf4 commented Jan 13, 2025

Have you been able to get updated packages and test that this is working for you now with the latest release?

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

2 participants