File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -111,8 +111,19 @@ postgres=# select pg_relation_filenode(16738) ;
1111113、孤儿数据文件还有对应的_init, _ fsm, _ vm后缀的文件, 也需要清理. 以上SQL没有考虑这个.
112112
113113最后补充一下, 为了防止误删, 还可以再用文件的修改和访问时间作为辅助判断, 一般孤儿文件可能是许久没有访问、修改过的.
114+ ```
115+ root@7a0cdb626505:~# stat a
116+ File: a
117+ Size: 0 Blocks: 0 IO Block: 4096 regular empty file
118+ Device: 3ah/58d Inode: 1322174 Links: 1
119+ Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
120+ Access: 2024-06-22 00:43:21.947595004 +0000
121+ Modify: 2024-06-22 00:43:21.947595004 +0000
122+ Change: 2024-06-22 00:43:21.947595004 +0000
123+ Birth: 2024-06-22 00:43:21.947595004 +0000
124+ ```
114125
115- 我写了一个比较严谨的找出所有孤儿文件的inline code:
126+ 下面, 我写了一个比较严谨的找出所有孤儿文件的inline code:
116127
117128连到实例的每个数据库去执行如下SQL: ( 除了 template0 库 )
118129```
You can’t perform that action at this time.
0 commit comments