问题
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