我在 Docker 容器中有一个数据库,我将它传输到服务器,但是在转储之后,我发现数据大小有 2-10 mb 的不同。只是没有发现数据丢失
为什么会发生这种情况
我像这样从docker转储数据
sudo docker exec -i docker_container pg_dump -U username -d database > /home/plazun/dump.sql
sudo -u postgres -i
psql -d database < /home/plazun/dump.sql
在码头工人
List of relations
Schema | Name | Type | Owner | Size | Description
--------+----------------+-------+------------+----------+-------------
public | table1 | table | owner | 24 MB |
public | table2 | table | owner | 127 MB |
public | table3 | table | owner | 16 kB |
public | table4 | table | owner | 10232 kB |
public | table5 | table | owner | 320 kB |
(5 rows)
在服务器上
List of relations
Schema | Name | Type | Owner | Size | Description
--------+----------------+-------+------------+----------+-------------
public | table1 | table | owner | 19 MB |
public | table2 | table | owner | 71 MB |
public | table3 | table | owner | 16 kB |
public | table4 | table | owner | 10216 kB |
public | table5 | table | owner | 296 kB |
(5 rows)