postgresql - `CLUSTER` 是否被 `pg_dump` 应用?

标签 postgresql pg-dump pg-restore

如果CLUSTER is set on a table ,那么它是否被 pg_dump 应用了?

具体如下:

  1. 它是否用于对转储中的行进行排序?如果没有,是否有办法做到这一点?
  2. 是否在使用pg_restore 时设置在表上?如果没有,是否有办法做到这一点?

最佳答案

转储将包含语句

ALTER TABLE mytable CLUSTER ON anindex;

恢复转储将执行该语句。作为the documentation解释,

This form selects the default index for future CLUSTER operations. It does not actually re-cluster the table.

关于postgresql - `CLUSTER` 是否被 `pg_dump` 应用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60976561/

相关文章:

java - 如何在 NULL 上设置 float PreparedStatement (jdbc) 的值

postgresql - 使用 pg_restore 进行多个转储时管理外键

postgresql - "peer authentication failed"将数据加载到 PostgreSQL 时出错

amazon-web-services - 通过 CloudFormation 堆栈部署初始化和填充无服务器 PostgreSQL RDS 实例的最佳实践

database - 在数据库中拆分值和参数是否可以

sql - rails/SQL : finding invoices by checking two sums

java - 延迟初始化: failed to lazily initialize a collection

postgresql - 如何在 Hasura 上进行 postgres 数据备份

PostgreSQL 9.0.13 执行 pg_restore 但没有证据表明正在使用磁盘空间

postgresql - pg_dump 重定向错误信息