暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

PostgreSQL 12 preview - vacuum analyze skip_locked

digoal 2019-03-31
322

作者

digoal

日期

2019-03-31

标签

PostgreSQL , vacuum , analyze , skip_locked


背景

vacuum或analyze时,支持skip_locked开关,当出现锁冲突时,跳过对应的RELATION。(注意事项,参考详细说明)

详细限制如下

```
SKIP_LOCKED

Specifies that VACUUM should not wait for any conflicting locks to be released when beginning work on a relation:
if a relation cannot be locked immediately without waiting, the relation is skipped.

Note that even with this option, VACUUM may still block when opening the relation's indexes.

Additionally, VACUUM ANALYZE may still block when acquiring sample rows from partitions,
table inheritance children, and some types of foreign tables.

Also, while VACUUM ordinarily processes all partitions of specified partitioned tables,
this option will cause VACUUM to skip all partitions if there is a conflicting lock on the partitioned table.
```

参考

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=ff9bff0a85b6c23d622b4913ed38f459866f0d3a

https://www.postgresql.org/docs/devel/sql-vacuum.html

PostgreSQL 许愿链接

您的愿望将传达给PG kernel hacker、数据库厂商等, 帮助提高数据库产品质量和功能, 说不定下一个PG版本就有您提出的功能点. 针对非常好的提议,奖励限量版PG文化衫、纪念品、贴纸、PG热门书籍等,奖品丰富,快来许愿。开不开森.

9.9元购买3个月阿里云RDS PostgreSQL实例

PostgreSQL 解决方案集合

德哥 / digoal's github - 公益是一辈子的事.

digoal's wechat

文章转载自digoal,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论