ALTER TABLE ONLY public.test ADD CONSTRAINT test_pkey PRIMARY KEY (a);
ALTER TABLE ONLY public.test DROP CONSTRAINT test_pkey ALTER TABLE public.test ADD CONSTRAINT test_pkey PRIMARY KEY (a);It's still recommended to double confirm the index only exists on the root partition before taking the above solution.