Загрузка данных


angel2@redosdozorbd ~]$ gunzip -c /mnt/data/dump.gz | head -200
--
-- PostgreSQL database cluster dump
--

SET default_transaction_read_only = off;

SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET escape_string_warning = off;

--
-- MAC attributes of system tablespaces
--

MAC LABEL ON TABLESPACE pg_global IS '{0,0}';
MAC CCR ON TABLESPACE pg_global IS ON;
MAC LABEL ON TABLESPACE pg_default IS '{0,0}';
MAC CCR ON TABLESPACE pg_default IS ON;

--
-- Roles
--

CREATE ROLE postgres;
ALTER ROLE postgres WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN REPLICATION BYPASSRLS PASSWORD 'md5808769c5f33743849c9ef5b5e848ac44';
ALTER ROLE postgres SET ac_session_audit TO '{SsRawdCTEMce:ce}';






\connect template1

--
-- PostgreSQL database dump
--

-- Dumped from database version 11.21 (Debian 1:11.21-astra.se6+ci1)
-- Dumped by pg_dump version 11.21 (Debian 1:11.21-astra.se6+ci1)

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

--
-- Name: DATABASE template1; Type: MAC LABEL; Schema: -; Owner: postgres
--

MAC LABEL ON DATABASE CURRENT_CATALOG IS '{0,0}';


--
-- Name: DATABASE template1; Type: MAC CCR; Schema: -; Owner: postgres
--

MAC CCR ON DATABASE CURRENT_CATALOG IS ON;


--
-- Name: SCHEMA public; Type: MAC LABEL; Schema: -; Owner: postgres
--

MAC LABEL ON SCHEMA public IS '{0,0}';


--
-- Name: SCHEMA public; Type: MAC CCR; Schema: -; Owner: postgres
--

MAC CCR ON SCHEMA public IS ON;


--
-- PostgreSQL database dump complete
--

--
-- PostgreSQL database dump
--

-- Dumped from database version 11.21 (Debian 1:11.21-astra.se6+ci1)
-- Dumped by pg_dump version 11.21 (Debian 1:11.21-astra.se6+ci1)

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

--
-- Name: AdmComUlanUde; Type: DATABASE; Schema: -; Owner: postgres
--

CREATE DATABASE "AdmComUlanUde" WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'ru_RU.UTF-8' LC_CTYPE = 'ru_RU.UTF-8';


ALTER DATABASE "AdmComUlanUde" OWNER TO postgres;

\connect "AdmComUlanUde"

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

--
-- Name: DATABASE "AdmComUlanUde"; Type: MAC LABEL; Schema: -; Owner: postgres
--

MAC LABEL ON DATABASE CURRENT_CATALOG IS '{0,0}';


--
-- Name: DATABASE "AdmComUlanUde"; Type: MAC CCR; Schema: -; Owner: postgres
--

MAC CCR ON DATABASE CURRENT_CATALOG IS ON;


--
-- Name: SCHEMA public; Type: MAC LABEL; Schema: -; Owner: postgres
--

MAC LABEL ON SCHEMA public IS '{0,0}';


--
-- Name: SCHEMA public; Type: MAC CCR; Schema: -; Owner: postgres
--

MAC CCR ON SCHEMA public IS ON;


--
-- Name: fasttrun; Type: EXTENSION; Schema: -; Owner: 
--

CREATE EXTENSION IF NOT EXISTS fasttrun WITH SCHEMA public;


--
-- Name: EXTENSION fasttrun; Type: COMMENT; Schema: -; Owner: 
--

COMMENT ON EXTENSION fasttrun IS 'fast transaction-unsafe truncate';


--
-- Name: EXTENSION fasttrun; Type: MAC LABEL; Schema: public; Owner: 
--

MAC LABEL ON EXTENSION fasttrun IS '{0,0}';


--
-- Name: fulleq; Type: EXTENSION; Schema: -; Owner: 
--

CREATE EXTENSION IF NOT EXISTS fulleq WITH SCHEMA public;


--
-- Name: EXTENSION fulleq; Type: COMMENT; Schema: -; Owner: 
--

COMMENT ON EXTENSION fulleq IS 'exact equal operation';


--
-- Name: EXTENSION fulleq; Type: MAC LABEL; Schema: public; Owner: 
--

MAC LABEL ON EXTENSION fulleq IS '{0,0}';


--
-- Name: mchar; Type: EXTENSION; Schema: -; Owner: 
--
[angel2@redosdozorbd ~]$ gunzip -c /mnt/data/dump.gz | grep -m1 -A5 "CREATE TABLE public._accumrg3035"
CREATE TABLE public._accumrg3035 (
    _period timestamp without time zone NOT NULL,
    _recorderrref bytea NOT NULL,
    _lineno numeric(9,0) NOT NULL,
    _active boolean NOT NULL,
    _recordkind numeric(1,0) NOT NULL,
[angel2@redosdozorbd ~]$