thoughtbot / parity

Shell commands for development, staging, and production parity for Heroku apps
https://thoughtbot.com
MIT License
889 stars 57 forks source link

Development restore not working after Catalina upgrade #175

Closed jessiebbaxter closed 4 years ago

jessiebbaxter commented 4 years ago

What command did you execute?

development restore-from production

What did you expect to happen?

I expected to restore my production backup into development

What actually happened?

I'm not sure which parts of the terminal log would be helpful so including the entire thing here. Apologies for the length.

pg_restore: connecting to database for restore pg_restore: dropping FK CONSTRAINT products fk_rails_f3b4d49caa pg_restore: while PROCESSING TOC: pg_restore: from TOC entry 3937; 2606 18909243 FK CONSTRAINT products fk_rails_f3b4d49caa wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.products" does not exist Command was: ALTER TABLE ONLY "public"."products" DROP CONSTRAINT "fk_rails_f3b4d49caa"; pg_restore: dropping FK CONSTRAINT recommendation_sources fk_rails_f09aa0b36e pg_restore: from TOC entry 3938; 2606 18909238 FK CONSTRAINT recommendation_sources fk_rails_f09aa0b36e wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.recommendation_sources" does not exist Command was: ALTER TABLE ONLY "public"."recommendation_sources" DROP CONSTRAINT "fk_rails_f09aa0b36e"; pg_restore: dropping FK CONSTRAINT inventories fk_rails_e94eb46135 pg_restore: from TOC entry 3934; 2606 18909233 FK CONSTRAINT inventories fk_rails_e94eb46135 wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.inventories" does not exist Command was: ALTER TABLE ONLY "public"."inventories" DROP CONSTRAINT "fk_rails_e94eb46135"; pg_restore: dropping FK CONSTRAINT product_category_assignments fk_rails_e3b9526e03 pg_restore: from TOC entry 3936; 2606 18909228 FK CONSTRAINT product_category_assignments fk_rails_e3b9526e03 wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.product_category_assignments" does not exist Command was: ALTER TABLE ONLY "public"."product_category_assignments" DROP CONSTRAINT "fk_rails_e3b9526e03"; pg_restore: dropping FK CONSTRAINT videos fk_rails_e2d05b1463 pg_restore: from TOC entry 3942; 2606 18909223 FK CONSTRAINT videos fk_rails_e2d05b1463 wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.videos" does not exist Command was: ALTER TABLE ONLY "public"."videos" DROP CONSTRAINT "fk_rails_e2d05b1463"; pg_restore: dropping FK CONSTRAINT employees fk_rails_dcfd3d4fc3 pg_restore: from TOC entry 3943; 2606 19147171 FK CONSTRAINT employees fk_rails_dcfd3d4fc3 wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.employees" does not exist Command was: ALTER TABLE ONLY "public"."employees" DROP CONSTRAINT "fk_rails_dcfd3d4fc3"; pg_restore: dropping FK CONSTRAINT recommendations fk_rails_844da8a1e5 pg_restore: from TOC entry 3940; 2606 18909218 FK CONSTRAINT recommendations fk_rails_844da8a1e5 wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.recommendations" does not exist Command was: ALTER TABLE ONLY "public"."recommendations" DROP CONSTRAINT "fk_rails_844da8a1e5"; pg_restore: dropping FK CONSTRAINT inventories fk_rails_716d2a48be pg_restore: from TOC entry 3933; 2606 18909213 FK CONSTRAINT inventories fk_rails_716d2a48be wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.inventories" does not exist Command was: ALTER TABLE ONLY "public"."inventories" DROP CONSTRAINT "fk_rails_716d2a48be"; pg_restore: dropping FK CONSTRAINT recommendations fk_rails_68d393f9ba pg_restore: from TOC entry 3939; 2606 18909208 FK CONSTRAINT recommendations fk_rails_68d393f9ba wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.recommendations" does not exist Command was: ALTER TABLE ONLY "public"."recommendations" DROP CONSTRAINT "fk_rails_68d393f9ba"; pg_restore: dropping FK CONSTRAINT video_questions fk_rails_476ff63cc1 pg_restore: from TOC entry 3941; 2606 18909203 FK CONSTRAINT video_questions fk_rails_476ff63cc1 wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.video_questions" does not exist Command was: ALTER TABLE ONLY "public"."video_questions" DROP CONSTRAINT "fk_rails_476ff63cc1"; pg_restore: dropping FK CONSTRAINT timesheets fk_rails_28c9d6300c pg_restore: from TOC entry 3944; 2606 19147185 FK CONSTRAINT timesheets fk_rails_28c9d6300c wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.timesheets" does not exist Command was: ALTER TABLE ONLY "public"."timesheets" DROP CONSTRAINT "fk_rails_28c9d6300c"; pg_restore: dropping FK CONSTRAINT product_category_assignments fk_rails_0691607ab8 pg_restore: from TOC entry 3935; 2606 18909198 FK CONSTRAINT product_category_assignments fk_rails_0691607ab8 wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.product_category_assignments" does not exist Command was: ALTER TABLE ONLY "public"."product_category_assignments" DROP CONSTRAINT "fk_rails_0691607ab8"; pg_restore: dropping INDEX index_videos_on_user_id pg_restore: from TOC entry 3921; 1259 18960664 INDEX index_videos_on_user_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_videos_on_user_id" does not exist Command was: DROP INDEX "public"."index_videos_on_user_id"; pg_restore: dropping INDEX index_videos_on_influencer_id pg_restore: from TOC entry 3920; 1259 18909197 INDEX index_videos_on_influencer_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_videos_on_influencer_id" does not exist Command was: DROP INDEX "public"."index_videos_on_influencer_id"; pg_restore: dropping INDEX index_video_questions_on_video_id pg_restore: from TOC entry 3917; 1259 18909196 INDEX index_video_questions_on_video_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_video_questions_on_video_id" does not exist Command was: DROP INDEX "public"."index_video_questions_on_video_id"; pg_restore: dropping INDEX index_users_roles_on_user_id_and_role_id pg_restore: from TOC entry 3916; 1259 18909195 INDEX index_users_roles_on_user_id_and_role_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_users_roles_on_user_id_and_role_id" does not exist Command was: DROP INDEX "public"."index_users_roles_on_user_id_and_role_id"; pg_restore: dropping INDEX index_users_roles_on_user_id pg_restore: from TOC entry 3915; 1259 18909194 INDEX index_users_roles_on_user_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_users_roles_on_user_id" does not exist Command was: DROP INDEX "public"."index_users_roles_on_user_id"; pg_restore: dropping INDEX index_users_roles_on_role_id pg_restore: from TOC entry 3914; 1259 18909193 INDEX index_users_roles_on_role_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_users_roles_on_role_id" does not exist Command was: DROP INDEX "public"."index_users_roles_on_role_id"; pg_restore: dropping INDEX index_users_on_reset_password_token pg_restore: from TOC entry 3911; 1259 18909192 INDEX index_users_on_reset_password_token wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_users_on_reset_password_token" does not exist Command was: DROP INDEX "public"."index_users_on_reset_password_token"; pg_restore: dropping INDEX index_users_on_email pg_restore: from TOC entry 3910; 1259 18909191 INDEX index_users_on_email wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_users_on_email" does not exist Command was: DROP INDEX "public"."index_users_on_email"; pg_restore: dropping INDEX index_timesheets_on_employee_id pg_restore: from TOC entry 3930; 1259 19147190 INDEX index_timesheets_on_employee_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_timesheets_on_employee_id" does not exist Command was: DROP INDEX "public"."index_timesheets_on_employee_id"; pg_restore: dropping INDEX index_roles_on_resource_type_and_resource_id pg_restore: from TOC entry 3905; 1259 18909190 INDEX index_roles_on_resource_type_and_resource_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_roles_on_resource_type_and_resource_id" does not exist Command was: DROP INDEX "public"."index_roles_on_resource_type_and_resource_id"; pg_restore: dropping INDEX index_roles_on_name_and_resource_type_and_resource_id pg_restore: from TOC entry 3904; 1259 18909189 INDEX index_roles_on_name_and_resource_type_and_resource_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_roles_on_name_and_resource_type_and_resource_id" does not exist Command was: DROP INDEX "public"."index_roles_on_name_and_resource_type_and_resource_id"; pg_restore: dropping INDEX index_recommendations_on_product_id pg_restore: from TOC entry 3901; 1259 18909188 INDEX index_recommendations_on_product_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_recommendations_on_product_id" does not exist Command was: DROP INDEX "public"."index_recommendations_on_product_id"; pg_restore: dropping INDEX index_recommendations_on_influencer_id pg_restore: from TOC entry 3900; 1259 18909187 INDEX index_recommendations_on_influencer_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_recommendations_on_influencer_id" does not exist Command was: DROP INDEX "public"."index_recommendations_on_influencer_id"; pg_restore: dropping INDEX index_recommendations_on_brand_id pg_restore: from TOC entry 3899; 1259 23281077 INDEX index_recommendations_on_brand_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_recommendations_on_brand_id" does not exist Command was: DROP INDEX "public"."index_recommendations_on_brand_id"; pg_restore: dropping INDEX index_recommendation_sources_on_video_id pg_restore: from TOC entry 3896; 1259 18909186 INDEX index_recommendation_sources_on_video_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_recommendation_sources_on_video_id" does not exist Command was: DROP INDEX "public"."index_recommendation_sources_on_video_id"; pg_restore: dropping INDEX index_recommendation_sources_on_recommendation_id pg_restore: from TOC entry 3895; 1259 18909185 INDEX index_recommendation_sources_on_recommendation_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_recommendation_sources_on_recommendation_id" does not exist Command was: DROP INDEX "public"."index_recommendation_sources_on_recommendation_id"; pg_restore: dropping INDEX index_products_on_slug pg_restore: from TOC entry 3892; 1259 18909184 INDEX index_products_on_slug wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_products_on_slug" does not exist Command was: DROP INDEX "public"."index_products_on_slug"; pg_restore: dropping INDEX index_products_on_brand_id pg_restore: from TOC entry 3891; 1259 18909183 INDEX index_products_on_brand_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_products_on_brand_id" does not exist Command was: DROP INDEX "public"."index_products_on_brand_id"; pg_restore: dropping INDEX index_product_category_assignments_on_product_id pg_restore: from TOC entry 3888; 1259 18909182 INDEX index_product_category_assignments_on_product_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_product_category_assignments_on_product_id" does not exist Command was: DROP INDEX "public"."index_product_category_assignments_on_product_id"; pg_restore: dropping INDEX index_product_category_assignments_on_category_id pg_restore: from TOC entry 3887; 1259 18909181 INDEX index_product_category_assignments_on_category_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_product_category_assignments_on_category_id" does not exist Command was: DROP INDEX "public"."index_product_category_assignments_on_category_id"; pg_restore: dropping INDEX index_pg_search_documents_on_searchable_type_and_searchable_id pg_restore: from TOC entry 3924; 1259 18925864 INDEX index_pg_search_documents_on_searchable_type_and_searchable_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_pg_search_documents_on_searchable_type_and_searchable_id" does not exist Command was: DROP INDEX "public"."index_pg_search_documents_on_searchable_type_and_searchable_id"; pg_restore: dropping INDEX index_inventories_on_product_id pg_restore: from TOC entry 3882; 1259 18909180 INDEX index_inventories_on_product_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_inventories_on_product_id" does not exist Command was: DROP INDEX "public"."index_inventories_on_product_id"; pg_restore: dropping INDEX index_inventories_on_merchant_id pg_restore: from TOC entry 3881; 1259 18909179 INDEX index_inventories_on_merchant_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_inventories_on_merchant_id" does not exist Command was: DROP INDEX "public"."index_inventories_on_merchant_id"; pg_restore: dropping INDEX index_influencers_on_slug pg_restore: from TOC entry 3878; 1259 18909178 INDEX index_influencers_on_slug wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_influencers_on_slug" does not exist Command was: DROP INDEX "public"."index_influencers_on_slug"; pg_restore: dropping INDEX index_friendly_id_slugs_on_sluggable_type_and_sluggable_id pg_restore: from TOC entry 3877; 1259 18909177 INDEX index_friendly_id_slugs_on_sluggable_type_and_sluggable_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_friendly_id_slugs_on_sluggable_type_and_sluggable_id" does not exist Command was: DROP INDEX "public"."index_friendly_id_slugs_on_sluggable_type_and_sluggable_id"; pg_restore: dropping INDEX index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope pg_restore: from TOC entry 3876; 1259 18909176 INDEX index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope" does not exist Command was: DROP INDEX "public"."index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope"; pg_restore: dropping INDEX index_friendly_id_slugs_on_slug_and_sluggable_type pg_restore: from TOC entry 3875; 1259 18909175 INDEX index_friendly_id_slugs_on_slug_and_sluggable_type wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_friendly_id_slugs_on_slug_and_sluggable_type" does not exist Command was: DROP INDEX "public"."index_friendly_id_slugs_on_slug_and_sluggable_type"; pg_restore: dropping INDEX index_friendly_id_slugs_on_slug pg_restore: from TOC entry 3874; 1259 18909174 INDEX index_friendly_id_slugs_on_slug wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_friendly_id_slugs_on_slug" does not exist Command was: DROP INDEX "public"."index_friendly_id_slugs_on_slug"; pg_restore: dropping INDEX index_employees_on_user_id pg_restore: from TOC entry 3929; 1259 19147176 INDEX index_employees_on_user_id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_employees_on_user_id" does not exist Command was: DROP INDEX "public"."index_employees_on_user_id"; pg_restore: dropping INDEX index_categories_on_slug pg_restore: from TOC entry 3871; 1259 23281080 INDEX index_categories_on_slug wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_categories_on_slug" does not exist Command was: DROP INDEX "public"."index_categories_on_slug"; pg_restore: dropping INDEX index_categories_on_ancestry pg_restore: from TOC entry 3870; 1259 23281079 INDEX index_categories_on_ancestry wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_categories_on_ancestry" does not exist Command was: DROP INDEX "public"."index_categories_on_ancestry"; pg_restore: dropping INDEX index_brands_on_slug pg_restore: from TOC entry 3867; 1259 23281076 INDEX index_brands_on_slug wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: index "index_brands_on_slug" does not exist Command was: DROP INDEX "public"."index_brands_on_slug"; pg_restore: dropping CONSTRAINT videos videos_pkey pg_restore: from TOC entry 3923; 2606 18909173 CONSTRAINT videos videos_pkey wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.videos" does not exist Command was: ALTER TABLE ONLY "public"."videos" DROP CONSTRAINT "videos_pkey"; pg_restore: dropping CONSTRAINT video_questions video_questions_pkey pg_restore: from TOC entry 3919; 2606 18909171 CONSTRAINT video_questions video_questions_pkey wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.video_questions" does not exist Command was: ALTER TABLE ONLY "public"."video_questions" DROP CONSTRAINT "video_questions_pkey"; pg_restore: dropping CONSTRAINT users users_pkey pg_restore: from TOC entry 3913; 2606 18909169 CONSTRAINT users users_pkey wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.users" does not exist Command was: ALTER TABLE ONLY "public"."users" DROP CONSTRAINT "users_pkey"; pg_restore: dropping CONSTRAINT timesheets timesheets_pkey pg_restore: from TOC entry 3932; 2606 19147184 CONSTRAINT timesheets timesheets_pkey wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.timesheets" does not exist Command was: ALTER TABLE ONLY "public"."timesheets" DROP CONSTRAINT "timesheets_pkey"; pg_restore: dropping CONSTRAINT schema_migrations schema_migrations_pkey pg_restore: from TOC entry 3909; 2606 18909165 CONSTRAINT schema_migrations schema_migrations_pkey wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.schema_migrations" does not exist Command was: ALTER TABLE ONLY "public"."schema_migrations" DROP CONSTRAINT "schema_migrations_pkey"; pg_restore: dropping CONSTRAINT roles roles_pkey pg_restore: from TOC entry 3907; 2606 18909163 CONSTRAINT roles roles_pkey wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.roles" does not exist Command was: ALTER TABLE ONLY "public"."roles" DROP CONSTRAINT "roles_pkey"; pg_restore: dropping CONSTRAINT recommendations recommendations_pkey pg_restore: from TOC entry 3903; 2606 18909161 CONSTRAINT recommendations recommendations_pkey wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.recommendations" does not exist Command was: ALTER TABLE ONLY "public"."recommendations" DROP CONSTRAINT "recommendations_pkey"; pg_restore: dropping CONSTRAINT recommendation_sources recommendation_sources_pkey pg_restore: from TOC entry 3898; 2606 18909159 CONSTRAINT recommendation_sources recommendation_sources_pkey wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.recommendation_sources" does not exist Command was: ALTER TABLE ONLY "public"."recommendation_sources" DROP CONSTRAINT "recommendation_sources_pkey"; pg_restore: dropping CONSTRAINT products products_pkey pg_restore: from TOC entry 3894; 2606 18909157 CONSTRAINT products products_pkey wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.products" does not exist Command was: ALTER TABLE ONLY "public"."products" DROP CONSTRAINT "products_pkey"; pg_restore: dropping CONSTRAINT product_category_assignments product_category_assignments_pkey pg_restore: from TOC entry 3890; 2606 18909153 CONSTRAINT product_category_assignments product_category_assignments_pkey wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.product_category_assignments" does not exist Command was: ALTER TABLE ONLY "public"."product_category_assignments" DROP CONSTRAINT "product_category_assignments_pkey"; pg_restore: dropping CONSTRAINT pg_search_documents pg_search_documents_pkey pg_restore: from TOC entry 3926; 2606 18925863 CONSTRAINT pg_search_documents pg_search_documents_pkey wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.pg_search_documents" does not exist Command was: ALTER TABLE ONLY "public"."pg_search_documents" DROP CONSTRAINT "pg_search_documents_pkey"; pg_restore: dropping CONSTRAINT merchants merchants_pkey pg_restore: from TOC entry 3886; 2606 18909149 CONSTRAINT merchants merchants_pkey wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.merchants" does not exist Command was: ALTER TABLE ONLY "public"."merchants" DROP CONSTRAINT "merchants_pkey"; pg_restore: dropping CONSTRAINT inventories inventories_pkey pg_restore: from TOC entry 3884; 2606 18909147 CONSTRAINT inventories inventories_pkey wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.inventories" does not exist Command was: ALTER TABLE ONLY "public"."inventories" DROP CONSTRAINT "inventories_pkey"; pg_restore: dropping CONSTRAINT influencers influencers_pkey pg_restore: from TOC entry 3880; 2606 18909145 CONSTRAINT influencers influencers_pkey wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.influencers" does not exist Command was: ALTER TABLE ONLY "public"."influencers" DROP CONSTRAINT "influencers_pkey"; pg_restore: dropping CONSTRAINT friendly_id_slugs friendly_id_slugs_pkey pg_restore: from TOC entry 3873; 2606 18909143 CONSTRAINT friendly_id_slugs friendly_id_slugs_pkey wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.friendly_id_slugs" does not exist Command was: ALTER TABLE ONLY "public"."friendly_id_slugs" DROP CONSTRAINT "friendly_id_slugs_pkey"; pg_restore: dropping CONSTRAINT employees employees_pkey pg_restore: from TOC entry 3928; 2606 19147170 CONSTRAINT employees employees_pkey wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.employees" does not exist Command was: ALTER TABLE ONLY "public"."employees" DROP CONSTRAINT "employees_pkey"; pg_restore: dropping CONSTRAINT categories categories_pkey pg_restore: from TOC entry 3869; 2606 18909141 CONSTRAINT categories categories_pkey wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.categories" does not exist Command was: ALTER TABLE ONLY "public"."categories" DROP CONSTRAINT "categories_pkey"; pg_restore: dropping CONSTRAINT brands brands_pkey pg_restore: from TOC entry 3866; 2606 18909139 CONSTRAINT brands brands_pkey wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.brands" does not exist Command was: ALTER TABLE ONLY "public"."brands" DROP CONSTRAINT "brands_pkey"; pg_restore: dropping CONSTRAINT ar_internal_metadata ar_internal_metadata_pkey pg_restore: from TOC entry 3864; 2606 18909137 CONSTRAINT ar_internal_metadata ar_internal_metadata_pkey wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.ar_internal_metadata" does not exist Command was: ALTER TABLE ONLY "public"."ar_internal_metadata" DROP CONSTRAINT "ar_internal_metadata_pkey"; pg_restore: dropping SEQUENCE SET videos_id_seq pg_restore: dropping SEQUENCE SET video_questions_id_seq pg_restore: dropping SEQUENCE SET users_id_seq pg_restore: dropping SEQUENCE SET timesheets_id_seq pg_restore: dropping SEQUENCE SET roles_id_seq pg_restore: dropping SEQUENCE SET recommendations_id_seq pg_restore: dropping SEQUENCE SET recommendation_sources_id_seq pg_restore: dropping SEQUENCE SET products_id_seq pg_restore: dropping SEQUENCE SET product_category_assignments_id_seq pg_restore: dropping SEQUENCE SET pg_search_documents_id_seq pg_restore: dropping SEQUENCE SET merchants_id_seq pg_restore: dropping SEQUENCE SET inventories_id_seq pg_restore: dropping SEQUENCE SET influencers_id_seq pg_restore: dropping SEQUENCE SET friendly_id_slugs_id_seq pg_restore: dropping SEQUENCE SET employees_id_seq pg_restore: dropping SEQUENCE SET categories_id_seq pg_restore: dropping SEQUENCE SET brands_id_seq pg_restore: dropping TABLE DATA videos pg_restore: dropping TABLE DATA video_questions pg_restore: dropping TABLE DATA users_roles pg_restore: dropping TABLE DATA users pg_restore: dropping TABLE DATA timesheets pg_restore: dropping TABLE DATA schema_migrations pg_restore: dropping TABLE DATA roles pg_restore: dropping TABLE DATA recommendations pg_restore: dropping TABLE DATA recommendation_sources pg_restore: dropping TABLE DATA products pg_restore: dropping TABLE DATA product_category_assignments pg_restore: dropping TABLE DATA pg_search_documents pg_restore: dropping TABLE DATA merchants pg_restore: dropping TABLE DATA inventories pg_restore: dropping TABLE DATA influencers pg_restore: dropping TABLE DATA friendly_id_slugs pg_restore: dropping TABLE DATA employees pg_restore: dropping TABLE DATA categories pg_restore: dropping TABLE DATA brands pg_restore: dropping TABLE DATA ar_internal_metadata pg_restore: dropping DEFAULT videos id pg_restore: from TOC entry 3858; 2604 18909135 DEFAULT videos id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.videos" does not exist Command was: ALTER TABLE "public"."videos" ALTER COLUMN "id" DROP DEFAULT; pg_restore: dropping DEFAULT video_questions id pg_restore: from TOC entry 3856; 2604 18909134 DEFAULT video_questions id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.video_questions" does not exist Command was: ALTER TABLE "public"."video_questions" ALTER COLUMN "id" DROP DEFAULT; pg_restore: dropping DEFAULT users id pg_restore: from TOC entry 3853; 2604 18909133 DEFAULT users id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.users" does not exist Command was: ALTER TABLE "public"."users" ALTER COLUMN "id" DROP DEFAULT; pg_restore: dropping DEFAULT timesheets id pg_restore: from TOC entry 3862; 2604 19147182 DEFAULT timesheets id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.timesheets" does not exist Command was: ALTER TABLE "public"."timesheets" ALTER COLUMN "id" DROP DEFAULT; pg_restore: dropping DEFAULT roles id pg_restore: from TOC entry 3852; 2604 18909131 DEFAULT roles id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.roles" does not exist Command was: ALTER TABLE "public"."roles" ALTER COLUMN "id" DROP DEFAULT; pg_restore: dropping DEFAULT recommendations id pg_restore: from TOC entry 3851; 2604 18909130 DEFAULT recommendations id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.recommendations" does not exist Command was: ALTER TABLE "public"."recommendations" ALTER COLUMN "id" DROP DEFAULT; pg_restore: dropping DEFAULT recommendation_sources id pg_restore: from TOC entry 3850; 2604 18909129 DEFAULT recommendation_sources id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.recommendation_sources" does not exist Command was: ALTER TABLE "public"."recommendation_sources" ALTER COLUMN "id" DROP DEFAULT; pg_restore: dropping DEFAULT products id pg_restore: from TOC entry 3847; 2604 18909128 DEFAULT products id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.products" does not exist Command was: ALTER TABLE "public"."products" ALTER COLUMN "id" DROP DEFAULT; pg_restore: dropping DEFAULT product_category_assignments id pg_restore: from TOC entry 3841; 2604 18909126 DEFAULT product_category_assignments id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.product_category_assignments" does not exist Command was: ALTER TABLE "public"."product_category_assignments" ALTER COLUMN "id" DROP DEFAULT; pg_restore: dropping DEFAULT pg_search_documents id pg_restore: from TOC entry 3860; 2604 18925858 DEFAULT pg_search_documents id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.pg_search_documents" does not exist Command was: ALTER TABLE "public"."pg_search_documents" ALTER COLUMN "id" DROP DEFAULT; pg_restore: dropping DEFAULT merchants id pg_restore: from TOC entry 3840; 2604 18909124 DEFAULT merchants id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.merchants" does not exist Command was: ALTER TABLE "public"."merchants" ALTER COLUMN "id" DROP DEFAULT; pg_restore: dropping DEFAULT inventories id pg_restore: from TOC entry 3839; 2604 18909123 DEFAULT inventories id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.inventories" does not exist Command was: ALTER TABLE "public"."inventories" ALTER COLUMN "id" DROP DEFAULT; pg_restore: dropping DEFAULT influencers id pg_restore: from TOC entry 3838; 2604 18909122 DEFAULT influencers id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.influencers" does not exist Command was: ALTER TABLE "public"."influencers" ALTER COLUMN "id" DROP DEFAULT; pg_restore: dropping DEFAULT friendly_id_slugs id pg_restore: from TOC entry 3835; 2604 18909121 DEFAULT friendly_id_slugs id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.friendly_id_slugs" does not exist Command was: ALTER TABLE "public"."friendly_id_slugs" ALTER COLUMN "id" DROP DEFAULT; pg_restore: dropping DEFAULT employees id pg_restore: from TOC entry 3861; 2604 19147168 DEFAULT employees id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.employees" does not exist Command was: ALTER TABLE "public"."employees" ALTER COLUMN "id" DROP DEFAULT; pg_restore: dropping DEFAULT categories id pg_restore: from TOC entry 3834; 2604 18909120 DEFAULT categories id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.categories" does not exist Command was: ALTER TABLE "public"."categories" ALTER COLUMN "id" DROP DEFAULT; pg_restore: dropping DEFAULT brands id pg_restore: from TOC entry 3833; 2604 18909119 DEFAULT brands id wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: relation "public.brands" does not exist Command was: ALTER TABLE "public"."brands" ALTER COLUMN "id" DROP DEFAULT; pg_restore: dropping SEQUENCE OWNED BY videos_id_seq pg_restore: dropping SEQUENCE videos_id_seq pg_restore: from TOC entry 227; 1259 18909117 SEQUENCE videos_id_seq wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: sequence "videos_id_seq" does not exist Command was: DROP SEQUENCE "public"."videos_id_seq"; pg_restore: dropping TABLE videos pg_restore: from TOC entry 226; 1259 18909110 TABLE videos wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: table "videos" does not exist Command was: DROP TABLE "public"."videos"; pg_restore: dropping SEQUENCE OWNED BY video_questions_id_seq pg_restore: dropping SEQUENCE video_questions_id_seq pg_restore: from TOC entry 225; 1259 18909108 SEQUENCE video_questions_id_seq wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: sequence "video_questions_id_seq" does not exist Command was: DROP SEQUENCE "public"."video_questions_id_seq"; pg_restore: dropping TABLE video_questions pg_restore: from TOC entry 224; 1259 18909101 TABLE video_questions wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: table "video_questions" does not exist Command was: DROP TABLE "public"."video_questions"; pg_restore: dropping TABLE users_roles pg_restore: from TOC entry 223; 1259 18909098 TABLE users_roles wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: table "users_roles" does not exist Command was: DROP TABLE "public"."users_roles"; pg_restore: dropping SEQUENCE OWNED BY users_id_seq pg_restore: dropping SEQUENCE users_id_seq pg_restore: from TOC entry 222; 1259 18909096 SEQUENCE users_id_seq wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: sequence "users_id_seq" does not exist Command was: DROP SEQUENCE "public"."users_id_seq"; pg_restore: dropping TABLE users pg_restore: from TOC entry 221; 1259 18909087 TABLE users wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: table "users" does not exist Command was: DROP TABLE "public"."users"; pg_restore: dropping SEQUENCE OWNED BY timesheets_id_seq pg_restore: dropping SEQUENCE timesheets_id_seq pg_restore: from TOC entry 232; 1259 19147177 SEQUENCE timesheets_id_seq wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: sequence "timesheets_id_seq" does not exist Command was: DROP SEQUENCE "public"."timesheets_id_seq"; pg_restore: dropping TABLE timesheets pg_restore: from TOC entry 233; 1259 19147179 TABLE timesheets wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: table "timesheets" does not exist Command was: DROP TABLE "public"."timesheets"; pg_restore: dropping TABLE schema_migrations pg_restore: from TOC entry 220; 1259 18909072 TABLE schema_migrations wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: table "schema_migrations" does not exist Command was: DROP TABLE "public"."schema_migrations"; pg_restore: dropping SEQUENCE OWNED BY roles_id_seq pg_restore: dropping SEQUENCE roles_id_seq pg_restore: from TOC entry 219; 1259 18909070 SEQUENCE roles_id_seq wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: sequence "roles_id_seq" does not exist Command was: DROP SEQUENCE "public"."roles_id_seq"; pg_restore: dropping TABLE roles pg_restore: from TOC entry 218; 1259 18909064 TABLE roles wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: table "roles" does not exist Command was: DROP TABLE "public"."roles"; pg_restore: dropping SEQUENCE OWNED BY recommendations_id_seq pg_restore: dropping SEQUENCE recommendations_id_seq pg_restore: from TOC entry 217; 1259 18909062 SEQUENCE recommendations_id_seq wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: sequence "recommendations_id_seq" does not exist Command was: DROP SEQUENCE "public"."recommendations_id_seq"; pg_restore: dropping TABLE recommendations pg_restore: from TOC entry 216; 1259 18909056 TABLE recommendations wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: table "recommendations" does not exist Command was: DROP TABLE "public"."recommendations"; pg_restore: dropping SEQUENCE OWNED BY recommendation_sources_id_seq pg_restore: dropping SEQUENCE recommendation_sources_id_seq pg_restore: from TOC entry 215; 1259 18909054 SEQUENCE recommendation_sources_id_seq wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: sequence "recommendation_sources_id_seq" does not exist Command was: DROP SEQUENCE "public"."recommendation_sources_id_seq"; pg_restore: dropping TABLE recommendation_sources pg_restore: from TOC entry 214; 1259 18909050 TABLE recommendation_sources wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: table "recommendation_sources" does not exist Command was: DROP TABLE "public"."recommendation_sources"; pg_restore: dropping SEQUENCE OWNED BY products_id_seq pg_restore: dropping SEQUENCE products_id_seq pg_restore: from TOC entry 213; 1259 18909048 SEQUENCE products_id_seq wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: sequence "products_id_seq" does not exist Command was: DROP SEQUENCE "public"."products_id_seq"; pg_restore: dropping TABLE products pg_restore: from TOC entry 212; 1259 18909039 TABLE products wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: table "products" does not exist Command was: DROP TABLE "public"."products"; pg_restore: dropping SEQUENCE OWNED BY product_category_assignments_id_seq pg_restore: dropping SEQUENCE product_category_assignments_id_seq pg_restore: from TOC entry 211; 1259 18909028 SEQUENCE product_category_assignments_id_seq wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: sequence "product_category_assignments_id_seq" does not exist Command was: DROP SEQUENCE "public"."product_category_assignments_id_seq"; pg_restore: dropping TABLE product_category_assignments pg_restore: from TOC entry 210; 1259 18909025 TABLE product_category_assignments wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: table "product_category_assignments" does not exist Command was: DROP TABLE "public"."product_category_assignments"; pg_restore: dropping SEQUENCE OWNED BY pg_search_documents_id_seq pg_restore: dropping SEQUENCE pg_search_documents_id_seq pg_restore: from TOC entry 228; 1259 18925853 SEQUENCE pg_search_documents_id_seq wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: sequence "pg_search_documents_id_seq" does not exist Command was: DROP SEQUENCE "public"."pg_search_documents_id_seq"; pg_restore: dropping TABLE pg_search_documents pg_restore: from TOC entry 229; 1259 18925855 TABLE pg_search_documents wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: table "pg_search_documents" does not exist Command was: DROP TABLE "public"."pg_search_documents"; pg_restore: dropping SEQUENCE OWNED BY merchants_id_seq pg_restore: dropping SEQUENCE merchants_id_seq pg_restore: from TOC entry 209; 1259 18909014 SEQUENCE merchants_id_seq wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: sequence "merchants_id_seq" does not exist Command was: DROP SEQUENCE "public"."merchants_id_seq"; pg_restore: dropping TABLE merchants pg_restore: from TOC entry 208; 1259 18909008 TABLE merchants wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: table "merchants" does not exist Command was: DROP TABLE "public"."merchants"; pg_restore: dropping SEQUENCE OWNED BY inventories_id_seq pg_restore: dropping SEQUENCE inventories_id_seq pg_restore: from TOC entry 207; 1259 18909006 SEQUENCE inventories_id_seq wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: sequence "inventories_id_seq" does not exist Command was: DROP SEQUENCE "public"."inventories_id_seq"; pg_restore: dropping TABLE inventories pg_restore: from TOC entry 206; 1259 18909000 TABLE inventories wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: table "inventories" does not exist Command was: DROP TABLE "public"."inventories"; pg_restore: dropping SEQUENCE OWNED BY influencers_id_seq pg_restore: dropping SEQUENCE influencers_id_seq pg_restore: from TOC entry 205; 1259 18908998 SEQUENCE influencers_id_seq wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: sequence "influencers_id_seq" does not exist Command was: DROP SEQUENCE "public"."influencers_id_seq"; pg_restore: dropping TABLE influencers pg_restore: from TOC entry 204; 1259 18908991 TABLE influencers wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: table "influencers" does not exist Command was: DROP TABLE "public"."influencers"; pg_restore: dropping SEQUENCE OWNED BY friendly_id_slugs_id_seq pg_restore: dropping SEQUENCE friendly_id_slugs_id_seq pg_restore: from TOC entry 203; 1259 18908989 SEQUENCE friendly_id_slugs_id_seq wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: sequence "friendly_id_slugs_id_seq" does not exist Command was: DROP SEQUENCE "public"."friendly_id_slugs_id_seq"; pg_restore: dropping TABLE friendly_id_slugs pg_restore: from TOC entry 202; 1259 18908983 TABLE friendly_id_slugs wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: table "friendly_id_slugs" does not exist Command was: DROP TABLE "public"."friendly_id_slugs"; pg_restore: dropping SEQUENCE OWNED BY employees_id_seq pg_restore: dropping SEQUENCE employees_id_seq pg_restore: from TOC entry 230; 1259 19147163 SEQUENCE employees_id_seq wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: sequence "employees_id_seq" does not exist Command was: DROP SEQUENCE "public"."employees_id_seq"; pg_restore: dropping TABLE employees pg_restore: from TOC entry 231; 1259 19147165 TABLE employees wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: table "employees" does not exist Command was: DROP TABLE "public"."employees"; pg_restore: dropping SEQUENCE OWNED BY categories_id_seq pg_restore: dropping SEQUENCE categories_id_seq pg_restore: from TOC entry 201; 1259 18908981 SEQUENCE categories_id_seq wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: sequence "categories_id_seq" does not exist Command was: DROP SEQUENCE "public"."categories_id_seq"; pg_restore: dropping TABLE categories pg_restore: from TOC entry 200; 1259 18908975 TABLE categories wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: table "categories" does not exist Command was: DROP TABLE "public"."categories"; pg_restore: dropping SEQUENCE OWNED BY brands_id_seq pg_restore: dropping SEQUENCE brands_id_seq pg_restore: from TOC entry 199; 1259 18908973 SEQUENCE brands_id_seq wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: sequence "brands_id_seq" does not exist Command was: DROP SEQUENCE "public"."brands_id_seq"; pg_restore: dropping TABLE brands pg_restore: from TOC entry 198; 1259 18908967 TABLE brands wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: table "brands" does not exist Command was: DROP TABLE "public"."brands"; pg_restore: dropping TABLE ar_internal_metadata pg_restore: from TOC entry 197; 1259 18908961 TABLE ar_internal_metadata wjtmzhbodkreil pg_restore: error: could not execute query: ERROR: table "ar_internal_metadata" does not exist Command was: DROP TABLE "public"."ar_internal_metadata"; pg_restore: dropping COMMENT EXTENSION "unaccent" pg_restore: dropping EXTENSION unaccent pg_restore: from TOC entry 2; 3079 22525829 EXTENSION unaccent pg_restore: error: could not execute query: ERROR: extension "unaccent" does not exist Command was: DROP EXTENSION "unaccent"; pg_restore: processing item 4105 ENCODING ENCODING pg_restore: processing item 4106 STDSTRINGS STDSTRINGS pg_restore: processing item 4107 SEARCHPATH SEARCHPATH pg_restore: processing item 4108 DATABASE d7bj7l5qj19t72 pg_restore: processing item 2 EXTENSION unaccent pg_restore: creating EXTENSION "unaccent" pg_restore: processing item 4109 COMMENT EXTENSION "unaccent" pg_restore: creating COMMENT "EXTENSION "unaccent"" pg_restore: processing item 197 TABLE ar_internal_metadata pg_restore: creating TABLE "public.ar_internal_metadata" pg_restore: processing item 198 TABLE brands pg_restore: creating TABLE "public.brands" pg_restore: processing item 199 SEQUENCE brands_id_seq pg_restore: creating SEQUENCE "public.brands_id_seq" pg_restore: processing item 4110 SEQUENCE OWNED BY brands_id_seq pg_restore: creating SEQUENCE OWNED BY "public.brands_id_seq" pg_restore: processing item 200 TABLE categories pg_restore: creating TABLE "public.categories" pg_restore: processing item 201 SEQUENCE categories_id_seq pg_restore: creating SEQUENCE "public.categories_id_seq" pg_restore: processing item 4111 SEQUENCE OWNED BY categories_id_seq pg_restore: creating SEQUENCE OWNED BY "public.categories_id_seq" pg_restore: processing item 231 TABLE employees pg_restore: creating TABLE "public.employees" pg_restore: processing item 230 SEQUENCE employees_id_seq pg_restore: creating SEQUENCE "public.employees_id_seq" pg_restore: processing item 4112 SEQUENCE OWNED BY employees_id_seq pg_restore: creating SEQUENCE OWNED BY "public.employees_id_seq" pg_restore: processing item 202 TABLE friendly_id_slugs pg_restore: creating TABLE "public.friendly_id_slugs" pg_restore: processing item 203 SEQUENCE friendly_id_slugs_id_seq pg_restore: creating SEQUENCE "public.friendly_id_slugs_id_seq" pg_restore: processing item 4113 SEQUENCE OWNED BY friendly_id_slugs_id_seq pg_restore: creating SEQUENCE OWNED BY "public.friendly_id_slugs_id_seq" pg_restore: processing item 204 TABLE influencers pg_restore: creating TABLE "public.influencers" pg_restore: processing item 205 SEQUENCE influencers_id_seq pg_restore: creating SEQUENCE "public.influencers_id_seq" pg_restore: processing item 4114 SEQUENCE OWNED BY influencers_id_seq pg_restore: creating SEQUENCE OWNED BY "public.influencers_id_seq" pg_restore: processing item 206 TABLE inventories pg_restore: creating TABLE "public.inventories" pg_restore: processing item 207 SEQUENCE inventories_id_seq pg_restore: creating SEQUENCE "public.inventories_id_seq" pg_restore: processing item 4115 SEQUENCE OWNED BY inventories_id_seq pg_restore: creating SEQUENCE OWNED BY "public.inventories_id_seq" pg_restore: processing item 208 TABLE merchants pg_restore: creating TABLE "public.merchants" pg_restore: processing item 209 SEQUENCE merchants_id_seq pg_restore: creating SEQUENCE "public.merchants_id_seq" pg_restore: processing item 4116 SEQUENCE OWNED BY merchants_id_seq pg_restore: creating SEQUENCE OWNED BY "public.merchants_id_seq" pg_restore: processing item 229 TABLE pg_search_documents pg_restore: creating TABLE "public.pg_search_documents" pg_restore: processing item 228 SEQUENCE pg_search_documents_id_seq pg_restore: creating SEQUENCE "public.pg_search_documents_id_seq" pg_restore: processing item 4117 SEQUENCE OWNED BY pg_search_documents_id_seq pg_restore: creating SEQUENCE OWNED BY "public.pg_search_documents_id_seq" pg_restore: processing item 210 TABLE product_category_assignments pg_restore: creating TABLE "public.product_category_assignments" pg_restore: processing item 211 SEQUENCE product_category_assignments_id_seq pg_restore: creating SEQUENCE "public.product_category_assignments_id_seq" pg_restore: processing item 4118 SEQUENCE OWNED BY product_category_assignments_id_seq pg_restore: creating SEQUENCE OWNED BY "public.product_category_assignments_id_seq" pg_restore: processing item 212 TABLE products pg_restore: creating TABLE "public.products" pg_restore: processing item 213 SEQUENCE products_id_seq pg_restore: creating SEQUENCE "public.products_id_seq" pg_restore: processing item 4119 SEQUENCE OWNED BY products_id_seq pg_restore: creating SEQUENCE OWNED BY "public.products_id_seq" pg_restore: processing item 214 TABLE recommendation_sources pg_restore: creating TABLE "public.recommendation_sources" pg_restore: processing item 215 SEQUENCE recommendation_sources_id_seq pg_restore: creating SEQUENCE "public.recommendation_sources_id_seq" pg_restore: processing item 4120 SEQUENCE OWNED BY recommendation_sources_id_seq pg_restore: creating SEQUENCE OWNED BY "public.recommendation_sources_id_seq" pg_restore: processing item 216 TABLE recommendations pg_restore: creating TABLE "public.recommendations" pg_restore: processing item 217 SEQUENCE recommendations_id_seq pg_restore: creating SEQUENCE "public.recommendations_id_seq" pg_restore: processing item 4121 SEQUENCE OWNED BY recommendations_id_seq pg_restore: creating SEQUENCE OWNED BY "public.recommendations_id_seq" pg_restore: processing item 218 TABLE roles pg_restore: creating TABLE "public.roles" pg_restore: processing item 219 SEQUENCE roles_id_seq pg_restore: creating SEQUENCE "public.roles_id_seq" pg_restore: processing item 4122 SEQUENCE OWNED BY roles_id_seq pg_restore: creating SEQUENCE OWNED BY "public.roles_id_seq" pg_restore: processing item 220 TABLE schema_migrations pg_restore: creating TABLE "public.schema_migrations" pg_restore: processing item 233 TABLE timesheets pg_restore: creating TABLE "public.timesheets" pg_restore: processing item 232 SEQUENCE timesheets_id_seq pg_restore: creating SEQUENCE "public.timesheets_id_seq" pg_restore: processing item 4123 SEQUENCE OWNED BY timesheets_id_seq pg_restore: creating SEQUENCE OWNED BY "public.timesheets_id_seq" pg_restore: processing item 221 TABLE users pg_restore: creating TABLE "public.users" pg_restore: processing item 222 SEQUENCE users_id_seq pg_restore: creating SEQUENCE "public.users_id_seq" pg_restore: processing item 4124 SEQUENCE OWNED BY users_id_seq pg_restore: creating SEQUENCE OWNED BY "public.users_id_seq" pg_restore: processing item 223 TABLE users_roles pg_restore: creating TABLE "public.users_roles" pg_restore: processing item 224 TABLE video_questions pg_restore: creating TABLE "public.video_questions" pg_restore: processing item 225 SEQUENCE video_questions_id_seq pg_restore: creating SEQUENCE "public.video_questions_id_seq" pg_restore: processing item 4125 SEQUENCE OWNED BY video_questions_id_seq pg_restore: creating SEQUENCE OWNED BY "public.video_questions_id_seq" pg_restore: processing item 226 TABLE videos pg_restore: creating TABLE "public.videos" pg_restore: processing item 227 SEQUENCE videos_id_seq pg_restore: creating SEQUENCE "public.videos_id_seq" pg_restore: processing item 4126 SEQUENCE OWNED BY videos_id_seq pg_restore: creating SEQUENCE OWNED BY "public.videos_id_seq" pg_restore: processing item 3833 DEFAULT brands id pg_restore: creating DEFAULT "public.brands id" pg_restore: processing item 3834 DEFAULT categories id pg_restore: creating DEFAULT "public.categories id" pg_restore: processing item 3861 DEFAULT employees id pg_restore: creating DEFAULT "public.employees id" pg_restore: processing item 3835 DEFAULT friendly_id_slugs id pg_restore: creating DEFAULT "public.friendly_id_slugs id" pg_restore: processing item 3838 DEFAULT influencers id pg_restore: creating DEFAULT "public.influencers id" pg_restore: processing item 3839 DEFAULT inventories id pg_restore: creating DEFAULT "public.inventories id" pg_restore: processing item 3840 DEFAULT merchants id pg_restore: creating DEFAULT "public.merchants id" pg_restore: processing item 3860 DEFAULT pg_search_documents id pg_restore: creating DEFAULT "public.pg_search_documents id" pg_restore: processing item 3841 DEFAULT product_category_assignments id pg_restore: creating DEFAULT "public.product_category_assignments id" pg_restore: processing item 3847 DEFAULT products id pg_restore: creating DEFAULT "public.products id" pg_restore: processing item 3850 DEFAULT recommendation_sources id pg_restore: creating DEFAULT "public.recommendation_sources id" pg_restore: processing item 3851 DEFAULT recommendations id pg_restore: creating DEFAULT "public.recommendations id" pg_restore: processing item 3852 DEFAULT roles id pg_restore: creating DEFAULT "public.roles id" pg_restore: processing item 3862 DEFAULT timesheets id pg_restore: creating DEFAULT "public.timesheets id" pg_restore: processing item 3853 DEFAULT users id pg_restore: creating DEFAULT "public.users id" pg_restore: processing item 3856 DEFAULT video_questions id pg_restore: creating DEFAULT "public.video_questions id" pg_restore: processing item 3858 DEFAULT videos id pg_restore: creating DEFAULT "public.videos id" pg_restore: entering main parallel loop pg_restore: launching item 4066 TABLE DATA ar_internal_metadata pg_restore: launching item 4067 TABLE DATA brands pg_restore: launching item 4069 TABLE DATA categories pg_restore: launching item 4071 TABLE DATA friendly_id_slugs pg_restore: processing data for table "public.brands" pg_restore: processing data for table "public.ar_internal_metadata" pg_restore: processing data for table "public.categories" pg_restore: processing data for table "public.friendly_id_slugs" pg_restore: finished item 4069 TABLE DATA categories pg_restore: launching item 3869 CONSTRAINT categories categories_pkey pg_restore: creating CONSTRAINT "public.categories categories_pkey" pg_restore: finished item 4067 TABLE DATA brands pg_restore: launching item 3866 CONSTRAINT brands brands_pkey pg_restore: creating CONSTRAINT "public.brands brands_pkey" pg_restore: finished item 4066 TABLE DATA ar_internal_metadata pg_restore: launching item 3864 CONSTRAINT ar_internal_metadata ar_internal_metadata_pkey pg_restore: creating CONSTRAINT "public.ar_internal_metadata ar_internal_metadata_pkey" pg_restore: finished item 3864 CONSTRAINT ar_internal_metadata ar_internal_metadata_pkey pg_restore: launching item 4073 TABLE DATA influencers pg_restore: processing data for table "public.influencers" pg_restore: finished item 3866 CONSTRAINT brands brands_pkey pg_restore: launching item 3867 INDEX index_brands_on_slug pg_restore: creating INDEX "public.index_brands_on_slug" pg_restore: finished item 3869 CONSTRAINT categories categories_pkey pg_restore: launching item 3870 INDEX index_categories_on_ancestry pg_restore: creating INDEX "public.index_categories_on_ancestry" pg_restore: finished item 3870 INDEX index_categories_on_ancestry pg_restore: launching item 3871 INDEX index_categories_on_slug pg_restore: creating INDEX "public.index_categories_on_slug" pg_restore: finished item 4073 TABLE DATA influencers pg_restore: launching item 3878 INDEX index_influencers_on_slug pg_restore: creating INDEX "public.index_influencers_on_slug" pg_restore: finished item 3871 INDEX index_categories_on_slug pg_restore: launching item 4075 TABLE DATA inventories pg_restore: processing data for table "public.inventories" pg_restore: finished item 3878 INDEX index_influencers_on_slug pg_restore: launching item 3880 CONSTRAINT influencers influencers_pkey pg_restore: creating CONSTRAINT "public.influencers influencers_pkey" pg_restore: finished item 3880 CONSTRAINT influencers influencers_pkey pg_restore: launching item 4077 TABLE DATA merchants pg_restore: processing data for table "public.merchants" pg_restore: finished item 3867 INDEX index_brands_on_slug pg_restore: launching item 4079 TABLE DATA product_category_assignments pg_restore: processing data for table "public.product_category_assignments" pg_restore: finished item 4077 TABLE DATA merchants pg_restore: launching item 3886 CONSTRAINT merchants merchants_pkey pg_restore: creating CONSTRAINT "public.merchants merchants_pkey" pg_restore: finished item 3886 CONSTRAINT merchants merchants_pkey pg_restore: launching item 4081 TABLE DATA products pg_restore: processing data for table "public.products" pg_restore: finished item 4071 TABLE DATA friendly_id_slugs pg_restore: launching item 3873 CONSTRAINT friendly_id_slugs friendly_id_slugs_pkey pg_restore: creating CONSTRAINT "public.friendly_id_slugs friendly_id_slugs_pkey" pg_restore: finished item 3873 CONSTRAINT friendly_id_slugs friendly_id_slugs_pkey pg_restore: launching item 3874 INDEX index_friendly_id_slugs_on_slug pg_restore: creating INDEX "public.index_friendly_id_slugs_on_slug" pg_restore: finished item 4075 TABLE DATA inventories pg_restore: launching item 3875 INDEX index_friendly_id_slugs_on_slug_and_sluggable_type pg_restore: creating INDEX "public.index_friendly_id_slugs_on_slug_and_sluggable_type" pg_restore: finished item 4079 TABLE DATA product_category_assignments pg_restore: launching item 3876 INDEX index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope pg_restore: creating INDEX "public.index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope" pg_restore: finished item 4081 TABLE DATA products pg_restore: launching item 3877 INDEX index_friendly_id_slugs_on_sluggable_type_and_sluggable_id pg_restore: creating INDEX "public.index_friendly_id_slugs_on_sluggable_type_and_sluggable_id" pg_restore: finished item 3877 INDEX index_friendly_id_slugs_on_sluggable_type_and_sluggable_id pg_restore: launching item 3881 INDEX index_inventories_on_merchant_id pg_restore: creating INDEX "public.index_inventories_on_merchant_id" pg_restore: finished item 3881 INDEX index_inventories_on_merchant_id pg_restore: launching item 3882 INDEX index_inventories_on_product_id pg_restore: creating INDEX "public.index_inventories_on_product_id" pg_restore: finished item 3882 INDEX index_inventories_on_product_id pg_restore: launching item 3884 CONSTRAINT inventories inventories_pkey pg_restore: creating CONSTRAINT "public.inventories inventories_pkey" pg_restore: finished item 3884 CONSTRAINT inventories inventories_pkey pg_restore: launching item 3887 INDEX index_product_category_assignments_on_category_id pg_restore: creating INDEX "public.index_product_category_assignments_on_category_id" pg_restore: finished item 3887 INDEX index_product_category_assignments_on_category_id pg_restore: launching item 3888 INDEX index_product_category_assignments_on_product_id pg_restore: creating INDEX "public.index_product_category_assignments_on_product_id" pg_restore: finished item 3888 INDEX index_product_category_assignments_on_product_id pg_restore: launching item 3890 CONSTRAINT product_category_assignments product_category_assignments_pkey pg_restore: creating CONSTRAINT "public.product_category_assignments product_category_assignments_pkey" pg_restore: finished item 3890 CONSTRAINT product_category_assignments product_category_assignments_pkey pg_restore: launching item 3891 INDEX index_products_on_brand_id pg_restore: creating INDEX "public.index_products_on_brand_id" pg_restore: finished item 3891 INDEX index_products_on_brand_id pg_restore: launching item 3892 INDEX index_products_on_slug pg_restore: creating INDEX "public.index_products_on_slug" pg_restore: finished item 3874 INDEX index_friendly_id_slugs_on_slug pg_restore: launching item 3933 FK CONSTRAINT inventories fk_rails_716d2a48be pg_restore: creating FK CONSTRAINT "public.inventories fk_rails_716d2a48be" pg_restore: finished item 3933 FK CONSTRAINT inventories fk_rails_716d2a48be pg_restore: launching item 3935 FK CONSTRAINT product_category_assignments fk_rails_0691607ab8 pg_restore: creating FK CONSTRAINT "public.product_category_assignments fk_rails_0691607ab8" pg_restore: finished item 3935 FK CONSTRAINT product_category_assignments fk_rails_0691607ab8 pg_restore: launching item 4083 TABLE DATA recommendation_sources pg_restore: processing data for table "public.recommendation_sources" pg_restore: finished item 4083 TABLE DATA recommendation_sources pg_restore: launching item 3895 INDEX index_recommendation_sources_on_recommendation_id pg_restore: creating INDEX "public.index_recommendation_sources_on_recommendation_id" pg_restore: finished item 3895 INDEX index_recommendation_sources_on_recommendation_id pg_restore: launching item 3896 INDEX index_recommendation_sources_on_video_id pg_restore: creating INDEX "public.index_recommendation_sources_on_video_id" pg_restore: finished item 3896 INDEX index_recommendation_sources_on_video_id pg_restore: launching item 3898 CONSTRAINT recommendation_sources recommendation_sources_pkey pg_restore: creating CONSTRAINT "public.recommendation_sources recommendation_sources_pkey" pg_restore: finished item 3898 CONSTRAINT recommendation_sources recommendation_sources_pkey pg_restore: launching item 4085 TABLE DATA recommendations pg_restore: processing data for table "public.recommendations" pg_restore: finished item 4085 TABLE DATA recommendations pg_restore: launching item 3899 INDEX index_recommendations_on_brand_id pg_restore: creating INDEX "public.index_recommendations_on_brand_id" pg_restore: finished item 3899 INDEX index_recommendations_on_brand_id pg_restore: launching item 3900 INDEX index_recommendations_on_influencer_id pg_restore: creating INDEX "public.index_recommendations_on_influencer_id" pg_restore: finished item 3900 INDEX index_recommendations_on_influencer_id pg_restore: launching item 3901 INDEX index_recommendations_on_product_id pg_restore: creating INDEX "public.index_recommendations_on_product_id" pg_restore: finished item 3901 INDEX index_recommendations_on_product_id pg_restore: launching item 3903 CONSTRAINT recommendations recommendations_pkey pg_restore: creating CONSTRAINT "public.recommendations recommendations_pkey" pg_restore: finished item 3903 CONSTRAINT recommendations recommendations_pkey pg_restore: launching item 3938 FK CONSTRAINT recommendation_sources fk_rails_f09aa0b36e pg_restore: creating FK CONSTRAINT "public.recommendation_sources fk_rails_f09aa0b36e" pg_restore: finished item 3875 INDEX index_friendly_id_slugs_on_slug_and_sluggable_type pg_restore: launching item 4087 TABLE DATA roles pg_restore: processing data for table "public.roles" pg_restore: finished item 3938 FK CONSTRAINT recommendation_sources fk_rails_f09aa0b36e pg_restore: launching item 3939 FK CONSTRAINT recommendations fk_rails_68d393f9ba pg_restore: creating FK CONSTRAINT "public.recommendations fk_rails_68d393f9ba" pg_restore: finished item 3939 FK CONSTRAINT recommendations fk_rails_68d393f9ba pg_restore: launching item 4089 TABLE DATA schema_migrations pg_restore: processing data for table "public.schema_migrations" pg_restore: finished item 4089 TABLE DATA schema_migrations pg_restore: launching item 3909 CONSTRAINT schema_migrations schema_migrations_pkey pg_restore: creating CONSTRAINT "public.schema_migrations schema_migrations_pkey" pg_restore: finished item 3909 CONSTRAINT schema_migrations schema_migrations_pkey pg_restore: launching item 4090 TABLE DATA users pg_restore: processing data for table "public.users" pg_restore: finished item 4087 TABLE DATA roles pg_restore: launching item 3904 INDEX index_roles_on_name_and_resource_type_and_resource_id pg_restore: creating INDEX "public.index_roles_on_name_and_resource_type_and_resource_id" pg_restore: finished item 4090 TABLE DATA users pg_restore: launching item 3905 INDEX index_roles_on_resource_type_and_resource_id pg_restore: creating INDEX "public.index_roles_on_resource_type_and_resource_id" pg_restore: finished item 3904 INDEX index_roles_on_name_and_resource_type_and_resource_id pg_restore: launching item 3910 INDEX index_users_on_email pg_restore: creating INDEX "public.index_users_on_email" pg_restore: finished item 3905 INDEX index_roles_on_resource_type_and_resource_id pg_restore: launching item 3907 CONSTRAINT roles roles_pkey pg_restore: creating CONSTRAINT "public.roles roles_pkey" pg_restore: finished item 3907 CONSTRAINT roles roles_pkey pg_restore: launching item 3911 INDEX index_users_on_reset_password_token pg_restore: creating INDEX "public.index_users_on_reset_password_token" pg_restore: finished item 3910 INDEX index_users_on_email pg_restore: launching item 4092 TABLE DATA users_roles pg_restore: processing data for table "public.users_roles" pg_restore: finished item 3911 INDEX index_users_on_reset_password_token pg_restore: launching item 3913 CONSTRAINT users users_pkey pg_restore: creating CONSTRAINT "public.users users_pkey" pg_restore: finished item 4092 TABLE DATA users_roles pg_restore: launching item 3914 INDEX index_users_roles_on_role_id pg_restore: creating INDEX "public.index_users_roles_on_role_id" pg_restore: finished item 3913 CONSTRAINT users users_pkey pg_restore: launching item 3915 INDEX index_users_roles_on_user_id pg_restore: creating INDEX "public.index_users_roles_on_user_id" pg_restore: finished item 3915 INDEX index_users_roles_on_user_id pg_restore: launching item 3916 INDEX index_users_roles_on_user_id_and_role_id pg_restore: creating INDEX "public.index_users_roles_on_user_id_and_role_id" pg_restore: finished item 3914 INDEX index_users_roles_on_role_id pg_restore: launching item 4093 TABLE DATA video_questions pg_restore: processing data for table "public.video_questions" pg_restore: finished item 3916 INDEX index_users_roles_on_user_id_and_role_id pg_restore: launching item 4095 TABLE DATA videos pg_restore: processing data for table "public.videos" pg_restore: finished item 4093 TABLE DATA video_questions pg_restore: launching item 3917 INDEX index_video_questions_on_video_id pg_restore: creating INDEX "public.index_video_questions_on_video_id" pg_restore: finished item 3917 INDEX index_video_questions_on_video_id pg_restore: launching item 3919 CONSTRAINT video_questions video_questions_pkey pg_restore: creating CONSTRAINT "public.video_questions video_questions_pkey" pg_restore: finished item 3919 CONSTRAINT video_questions video_questions_pkey pg_restore: launching item 4098 TABLE DATA pg_search_documents pg_restore: processing data for table "public.pg_search_documents" pg_restore: error: could not find block ID 4098 in archive -- possibly due to out-of-order restore request, which cannot be handled due to lack of data offsets in archive pg_restore: error: a worker process died unexpectedly NOTICE: relation "ar_internal_metadata" already exists, skipping UPDATE 1

Some information about your installation

Operating system: OS X 10.15.2

which development /usr/local/bin/development

which staging /usr/local/bin/staging

which production /usr/local/bin/production

brew list parity /usr/local/Cellar/parity/3.2.0/bin/development /usr/local/Cellar/parity/3.2.0/bin/pr_app /usr/local/Cellar/parity/3.2.0/bin/production /usr/local/Cellar/parity/3.2.0/bin/staging /usr/local/Cellar/parity/3.2.0/lib/parity/ (5 files) /usr/local/Cellar/parity/3.2.0/lib/parity.rb

etcook commented 4 years ago

I've also been running into this across all my devices running Catalina. I'm not sure if that's the issue, as I've only done a clean restore from 2 devices I've purchased since Catalina was released, but I can no longer get a clean restore.

etcook commented 4 years ago

After doing some research and testing, this is actually related to the -j option and may be an older concurrency bug with pg_restore. Is there any way to disable using -j in the parity gem?

etcook commented 4 years ago

I did some further testing and it seems like any -j option causes this issue. I've also manually backed up and restored a database with the -j option without an issue. It seems that this is an issue ONLY with Heroku backups. I have a support ticket in with Heroku about it and will update this issue accordingly.

etcook commented 4 years ago

Response from Heroku:

Sorry about this and thanks for bringing it to our attention. I've been able to reproduce the issue in a test environment and have escalated this for an investigation from our engineering team. We'll update you once we hear more.

swanson commented 4 years ago

Maybe a related issue that offers some other workarounds: https://github.com/PostgresApp/PostgresApp/issues/538

We're seeing issues restoring to development from Heroku backups. Still trying to determine if Mojave vs Catalina or Postgres.app vs pg from brew has an impact, but somewhat reluctant to wipe all development dbs if we can't restore at the moment 😬

etcook commented 4 years ago

@swanson Restores from manual backups work without issue. Heroku restores work as long as you don't use the -j option, which unfortunately, parity does automatically and after looking at the source, there doesn't seem to be a way to disable that feature.

swanson commented 4 years ago

@etcook ah, sorry! I misinterpreted this line: "It seems that this is an issue ONLY with Heroku backups" and your comment about having an open ticket with Heroku to mean that you could not restore from a Heroku generated backup at all.

Thanks for your comments about the -j flag, it was able to get us unblocked for the moment.

etcook commented 4 years ago

I've tested and confirmed that the Heroku backups will restore as long as you're using pg_restore < 12. I used asdf to install (and shim) 11.6, and have Parity gem restores working. I will continue to work with Heroku to try to resolve.

itsjms commented 4 years ago

Installing postgres@11 via brew fixed this issue for me as well. I'm on Mojave so not sure the Catalina upgrade is what triggers the issue in all cases. Thank you @etcook.

geoffharcourt commented 4 years ago

We saw some issues with parallel backups and DBs larger than 20GB. Do any of you affected have databases bigger than that?

swanson commented 4 years ago

We saw some issues with parallel backups and DBs larger than 20GB. Do any of you affected have databases bigger than that?

No, our database is only 90 MB (per Heroku PG dashboard). We'll try to test out master (with #176 merged) to see if it resolves the problem.

itsjms commented 4 years ago

@geoffharcourt DB was only 1GB. Before installing postgres@11 via homebrew I was using the Postgres.app and on postgres version 9.6 (which is now uninstalled) -- I landed here from https://github.com/PostgresApp/PostgresApp/issues/538#issuecomment-572180229 which might somehow be related?

etcook commented 4 years ago

We saw some issues with parallel backups and DBs larger than 20GB. Do any of you affected have databases bigger than that?

The issue seems unrelated to size and seems to occur whenever you use pg 12 to restore a dump from a previous version of pg.

isab commented 4 years ago

I've tested and confirmed that the Heroku backups will restore as long as you're using pg_restore < 12. I used asdf to install (and shim) 11.6, and have Parity gem restores working. I will continue to work with Heroku to try to resolve.

@etcook could you explain how you did this? like what you wrote on the command line please?

or if anyone knows a way I can install parity without the latest version of pg_restore

richiethomas commented 4 years ago

@isab what happens if you install and run PSQL v 11 using Postgres.app? If you have PSQL installed via something like Homebrew, you might need to shut it down using brew services stop postgresql. I'd be curious to know what happens if you run PSQL v11 via Postgres.app, and then install & run Parity.

isab commented 4 years ago

@richiethomas using the Postgres app fixes it! wish i asked earlier, i spent hours trying to get brew to switch my versions.

richiethomas commented 4 years ago

@geoffharcourt @etcook I wonder if the breakage is related to the following exerpt from the PSQL v12 release notes:

E.2.3.9.1. pg_dump, pg_dumpall, pg_restore
...
Decouple the order of operations in a parallel pg_dump from the order used by a subsequent parallel pg_restore (Tom Lane)

This allows pg_restore to perform more-fully-parallelized parallel restores, especially in cases where the original dump was not done in parallel. Scheduling of a parallel pg_dump is also somewhat improved.

The posted release date is 2019-10-03.

isab commented 4 years ago

@richiethomas @etcook sorry I might have spoke too soon.

So the postgress.app solved my problem with getting parity to run. but I'm actually still having a problem with the pg_restore dropping all the keys and indexes and not restoring them.

output here:

pg_restore: [archiver (db)] Error from TOC entry 4180; 2606 22523369 CONSTRAINT meetings meetings_pkey nutnoeonuwgdva
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "public.meetings" does not exist
    Command was: ALTER TABLE ONLY "public"."meetings" DROP CONSTRAINT "meetings_pkey";

pg_restore: dropping CONSTRAINT meeting_attendances meeting_attendances_pkey
pg_restore: [archiver (db)] Error from TOC entry 4176; 2606 22523367 CONSTRAINT meeting_attendances meeting_attendances_pkey nutnoeonuwgdva
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "public.meeting_attendances" does not exist
    Command was: ALTER TABLE ONLY "public"."meeting_attendances" DROP CONSTRAINT "meeting_attendances_pkey";

pg_restore: dropping CONSTRAINT locations locations_pkey
pg_restore: [archiver (db)] Error from TOC entry 4174; 2606 22523365 CONSTRAINT locations locations_pkey nutnoeonuwgdva
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "public.locations" does not exist
    Command was: ALTER TABLE ONLY "public"."locations" DROP CONSTRAINT "locations_pkey";

pg_restore: dropping CONSTRAINT jobs jobs_pkey
pg_restore: [archiver (db)] Error from TOC entry 4172; 2606 22523363 CONSTRAINT jobs jobs_pkey nutnoeonuwgdva
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "public.jobs" does not exist
    Command was: ALTER TABLE ONLY "public"."jobs" DROP CONSTRAINT "jobs_pkey";
etcook commented 4 years ago

@isab @richiethomas the version of pg_restore you are using is independent of Parity. Parity just runs the commands for you. That is why I suggested installing asdf, and setting 11.6 as your global/local version, so Parity will run while shimmed to the 11.6 installation. Installing a version with the Postgres.app doesn't necessarily meant that's the version that your shell is using.

To figure out what version of pg_restore you're using, type pg_restore -V at the command line. From my experience, as long as you're using <12, the restores seem to be working ok. This seems to be largely a result of attempting to restore to 12 from <12 backups created by Heroku.

etcook commented 4 years ago

@etcook could you explain how you did this? like what you wrote on the command line please?

or if anyone knows a way I can install parity without the latest version of pg_restore

ASDF Getting Started

ASDF is an environment manager akin to RVM that supports multiple languages/frameworks/libs. It has a Postgres plugin that allows you to install multiple versions of pg, and set the specific version to use at a local, shell or global level.

Follow the directions above to install ASDF specific to your system. Then install the Postgres plugin.

asdf plugin-add postgres

Then install the version of Pg that you would like.

asdf install postgres 11.6

Then you can set the postgres version manually locally (while in that directory), shell (session) or globally. I've found it is most reliable while using Parity to set the Postgres version globally.

asdf local postgres 11.6 or asdf global postgres 11.6

Hope this helps!

geoffharcourt commented 4 years ago

asdf is awesome (and thank you @etcook for distinguishing between Parity and PG concerns here), but one note about using it for asdf is that I've seen several folks have trouble getting it working well with PG over SSL, which is not an issue for local development but can be for using psql to connect to remote databases.

swanson commented 4 years ago

Just helped setup a new dev machine today, here is our current workaround for Catalina with Postgres.app:

Check the pg_restore version (pg_restore --version). If it's 12, things will not work.

Make sure you've followed this step in the installation guidelines:

  1. Configure your $PATH to use the included command line tools (optional):

sudo mkdir -p /etc/paths.d && echo /Applications/Postgres.app/Contents/Versions/latest/bin | sudo tee /etc/paths.d/postgresapp

Now open /etc/paths.d/postgresapp and change latest to 11. Reload shell and pg_restore --version should now be back to 11 and parity should work as expected.

geoffharcourt commented 4 years ago

If I'm understanding this correctly, the issues at this point are related to a mismatch of PG versions locally and on Heroku. If that's the case, we'll close this issue out shortly.

swanson commented 4 years ago

My understanding of the current state of things:

So the happy path of brew install parity then do a parity backup will not work right now.

Paths forward:

swanson commented 4 years ago

I installed the new 3.3.0 homebrew release of parity, undid my local changes to shim an older version of pg_restore.

➜ brew list parity
/usr/local/Cellar/parity/3.3.0/bin/development
/usr/local/Cellar/parity/3.3.0/bin/pr_app
/usr/local/Cellar/parity/3.3.0/bin/production
/usr/local/Cellar/parity/3.3.0/bin/staging
/usr/local/Cellar/parity/3.3.0/lib/parity/ (5 files)
/usr/local/Cellar/parity/3.3.0/lib/parity.rb
➜ pg_restore --version
pg_restore (PostgreSQL) 12.2

I was able to do a fresh restore from Heroku to my local database (which is running pg 10) successfully. Thanks @geoffharcourt!

I think this issue can be closed. @jessiebbaxter could you try upgrading to Parity 3.3.0 and see if the problem persists?

lordofthedanse commented 4 years ago

@swanson this fixed my issue: I recently upgraded to 12.2 on Heroku and a variety of indices and (but not all, and not consistently across different tables) were getting dropped, e.g.:

-  create_table "milestones", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
+  create_table "milestones", id: false, force: :cascade do |t|
+    t.uuid "id", default: -> { "gen_random_uuid()" }, null: false

Foreign keys for these tables were also getting dropped (as one might expect since the id was being set to false for these tables).

Anyway, all is great now, so thanks for parity 3.3.0. And I was have this problem on both Mojave and Catalina, FYI.

geoffharcourt commented 4 years ago

We can reopen if this is still problematic for anyone as of 3.3.3.