Overview of el8_migrate_locale.py
The el8_migrate_locale.py utility is used to address issues caused by glibc locale changes when upgrading from Enterprise Linux 7 to Enterprise Linux 8 or 9. The --pre_upgrade flag is specifically used before upgrading the operating system to identify and prepare database objects that might be affected by these changes.
When using the el8_migrate_locale/el8_migrate_locale.py utility in GPDB 6.27.x and older, partition data will not be printed to the specified output.
6.27.x and older.
In GPDB versions 6.27.x and older, the --pre_upgrade flag is need to identify objects in your Greenplum database that could be impacted by locale changes.
[[email protected]]-/var/gpdb/myhost/6.27.1/bin/el8_migrate_locale # ./el8_migrate_locale.py --dbname admin precheck-table --out /var/gpadmin/data.txt
2025-03-06 10:03:07,913 - WARNING - There are 1 range partitioning tables with partition key in collate types(like varchar, char, text) in database dbname, these tables might be affected due to Glibc upgrade and should be checked when doing OS upgrade from EL7 to EL8.
2025-03-06 10:03:07,914 - INFO - worker[0]: begin:
2025-03-06 10:03:07,914 - INFO - worker[0]: connect to <dbname> ...
2025-03-06 10:03:08,161 - INFO - Current progress: have 0 remaining, 0.25 seconds passed.
2025-03-06 10:03:08,161 - INFO - worker[0]: finish.
2025-03-06 10:03:44,016 - WARNING - There are 1 range partitioning tables with partition key in collate types(like varchar, char, text) in database dbname, these tables might be affected due to Glibc upgrade and should be checked when doing OS upgrade from EL7 to EL8.
2025-03-06 10:03:44,017 - INFO - worker[0]: begin:
2025-03-06 10:03:44,017 - INFO - worker[0]: connect to <dbname> ...
2025-03-06 10:03:44,337 - INFO - Current progress: have 0 remaining, 0.32 seconds passed.
2025-03-06 10:03:44,337 - INFO - worker[0]: finish.
---------------------------------------------
total partition tables size : 0 Bytes
total partition tables : 0
total leaf partitions : 0
Adding the --pre_upgrade flag to the ./el8_migrate_locale.py command will populate partition data in the outfile.
[[email protected]]/var/gpdb/myhost/6.27.1/bin/el8_migrate_locale # ./el8_migrate_locale.py --dbname admin precheck-table --out /var/gpadmin/data.txt --pre_upgrade
2025-03-06 10:04:32,381 - WARNING - There are 1 range partitioning tables with partition key in collate types(like varchar, char, text) in database dbname, these tables might be affected due to Glibc upgrade and should be checked when doing OS upgrade from EL7 to EL8.
2025-03-06 10:04:35,563 - WARNING - no default partition for tblname
2025-03-06 10:05:12,676 - WARNING - There are 1 range partitioning tables with partition key in collate types(like varchar, char, text) in database dbname, these tables might be affected due to Glibc upgrade and should be checked when doing OS upgrade from EL7 to EL8.
2025-03-06 10:05:12,980 - WARNING - no default partition for tblname
---------------------------------------------
total partition tables size : 0 Bytes
total partition tables : 2
total leaf partitions : 2
---------------------------------------------