How to backup a partitioned table in PostgresSQL 10

那年仲夏 提交于 2019-12-11 08:03:27

问题


Is it possible to make a backup of a specific partitioned table with PostgreSQL 10?

When using:

sudo pg_dump -Fc -f "/home/schema.backup" -t schema.partitioned_table dbname

I am only getting the skeleton of the base table, without any values and without any partitions.

I also couldn't find anything in the extensive documentation.


回答1:


You'd have to use -t for all partitions.

This is probably a consequence of the design decision to have partitions visible as individual tables on the SQL level.



来源:https://stackoverflow.com/questions/52973236/how-to-backup-a-partitioned-table-in-postgressql-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!