N
N
Nobody_Admin2018-02-05 18:52:03
PostgreSQL
Nobody_Admin, 2018-02-05 18:52:03

Why does an error occur when restoring the database?

I use the 1C server in conjunction with Postgress. I'm setting up a backup in Postgres, I ran into a problem. The dump is created by the command

pg_dump.exe -U postgres -F c -f "filename.backup" db_name
and completes successfully. However, when trying to restore to the test database with the command
pg_restore.exe -i -h localhost -p 5432 -U postgres -d test_db -v "filename.backup"
I get errors like
pg_restore: creating TABLE _documentchngr8405
pg_restore: [archiver (db)] Error from table of contents entry 1155; 1259 3384304 TABL E
_documentchngr8405 postgres
pg_restore: [archiver (DB)] could not execute query:
¶Rch S?S?S%RchS?S'R?S?RchS' Command executed
: CREATE TABLE _documentchngr8405 (
_nodetref bytea NOT NULL,
_noderref bytea NOT NULL,
_messageno numeric(10,0),

and
pg_restore: [archiver (db)] could not execute query: РћРЁР??Р'РљРђ: нераспозРРЅР°Рный параметр конфигурац_rowsecurity"

Both databases were created using 1C tools; the databases were not created directly in Postgress. The base encoding is the same, UTF8. For both databases, the request from PgAdmin looks like this, only the name of the database changes
CREATE DATABASE test_db
  WITH OWNER = postgres
       ENCODING = 'UTF8'
       TABLESPACE = pg_default
       LC_COLLATE = 'Russian_Russia.1251'
       LC_CTYPE = 'Russian_Russia.1251'
       CONNECTION LIMIT = -1;

Where is the error? I suspect that the matter is in encodings, but where exactly?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
N
Nobody_Admin, 2018-03-23
@Nobody_Admin

The issue is resolved, the dumps themselves were formed incorrectly.

D
Dimonchik, 2018-02-05
@dimonchik2013

and
unrecognized configuration parameter: "row_security"
already recognized?

D
Dmitry Kinash, 2018-02-05
@Dementor

Try to make the archive explicitly specifying UTF8 encoding.

-E encoding
--encoding=encoding
Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)

S
SCINER, 2019-10-24
@SCINER

Просто дамп сделан в более новой версии PostgreSQL.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question