从.sql文件恢复Postgres无法正常工作

时间:2020-10-07 07:58:04

标签: sql postgresql psql pg-restore

我有一个.sql文件(60GB +),带有以下标头(又名前几行)


-- Dumped from database version 12.1 (Ubuntu 12.1-1.pgdg18.04+1)
-- Dumped by pg_dump version 12.1 (Ubuntu 12.1-1.pgdg18.04+1)

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

--
-- Data for Name: search_pages; Type: TABLE DATA; Schema: public; Owner: crawler-production
--

COPY public.search_pages (response, url, updated_at) FROM stdin;
...

问题是:我正在尝试通过psql $CRAWLER_PG_URI < dump.sql还原它。看起来好像正在运行,几分钟后完成,没有引发任何错误,但是数据不存在。

注意:response是一个非常复杂的JSONB字段。

关于可能发生的事情的任何想法吗?

0 个答案:

没有答案
相关问题