Answer the question
In order to leave comments, you need to log in
How to solve a problem when copying a table in PostgreSQL?
There is a DB, the backup copy is removed every day. But lately there have been errors when deploying a copy. Data duplication errors began to appear in the dump, although no duplicates were found on the original. After digging deeper, I found out that when pg_dump is launched, the COPY command is called. As a result, I got an interesting picture
# copy my_table (id, filter_state_id, analytic_pack, view_type, detail_type, top,
params_json, code, name) to '/tmp/copy.txt';
$ cat /tmp/copy.txt | grep 43727
43727 4425 AnyData 1 1 7 AnyName
43727 4425 AnyData 1 1 7 AnyName
# select * from my_table where id=43727;
id | filter_state_id | analytic_pack | view_type | detail_type | top | params_json | code | name
-------+-----------------+---------------+-----------+-------------+-----+-------------+------+--------------
43727 | 4425 | AnyData | 1 | 1 | 7 | | | AnyName
(1 row)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question