**AWX restore failing with ERROR: cannot drop index **
Hello,
I’m running AWX 24.6.1 on the 2.19.1 operator. I have a primary and secondary AWX instance I do a daily awxbackup and awxrestore to.
This process has been working well until I upgraded yesterday from AWX operator 2.10.0 to 2.19.1. Since then, the awxrestore has been cycling endlessly with a postgresql error on the secondary about it being unable to drop a lot of indices:
awx-manager fatal: [localhost]: FAILED! => {"changed": true, "rc": 1, "return_code": 1, "stderr": "pg_restore: error: could not execute query: ERROR: cannot drop index public.main_systemjobevent_20240813_system_job_id_job_created_uu_idx10 because index public.main_system_system__e39825_idx requires it\nHINT: You can drop index public.main_system_system__e39825_idx instead.\nCommand was: DROP INDEX IF EXISTS public.main_systemjobevent_20240813_system_job_id_job_created_uu_idx10;\npg_restore: error: could not execute query: ERROR: cannot drop index public.main_systemjobevent_20240813_system_job_id_job_created_co_idx10 because index public.main_system_system__73537a_idx requires it\nHINT: You can drop index public.main_system_system__73537a_idx instead.\nCommand was: DROP INDEX IF EXISTS public.main_systemjobevent_20240813_sy
[...]
ERROR: cannot drop index public.main_systemjobevent_20240813_14_modified_idx because index public.main_systemjobevent_modified_e4b3f14a requires it\nHINT: You can drop index public.main_systemjobevent_modified_e4b3f14a instead.\nCommand was: DROP INDEX IF EXISTS public.main_systemjobevent_20240813_14_modified_idx;\npg_restore: error: could not execute query: ERROR: cannot drop index public.main_systemjobevent_20240813_13_modified_idx because index public.main_systemjobevent_modified_e4b3f14a requires it\nHINT: You can drop index public.main_systemjobevent_modified_e4b3f14a instead.\nCommand was: DROP INDEX IF EXISTS public.main_systemjobevent_20240813_13_modified_idx;\npg_restore: error: could not execute query: ERROR: cannot drop index public.main_systemjobevent_20240813_12_modified_idx because index public.main_systemjobevent_modified_e4b3f14a requires it\nHINT: You can drop index public.main_systemjobevent_modified_e4b3f14a instead.\nCommand was: DROP INDEX IF EXISTS public.main_systemjobevent_20240813_12_modified_idx;\npg_restore: error: could not execute query: ERROR: cannot drop index public.main_systemjobevent_20240813_04_modified_idx because index public.main_systemjobevent_modified_e4b3f14a requires it\nHINT: You can drop index publawx-manager
awx-manager -------------------------------------------------------------------------------
I’ve tried to blow away this secondary AWX instance entirely (including the managed postgresql) and kick off the restore again to no difference. I deleted the AWX object in k8s, deleted the PVC, etc, and the restore still ends up this way. I also tried enabling force_drop_db: true
but that yields a different set of permission denials, unable to drop the DB. Manually corrected the awx user’s permissions in postgresql.
Any help is appreciated, I’m not sure what to do after blowing away the pvc and it still having these issues.