Skip to content

Commit bf2426a

Browse files
author
digoal
committed
fix
1 parent aef7933 commit bf2426a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

202406/20240621_01.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,19 @@ postgres=# select pg_relation_filenode(16738) ;
111111
3、孤儿数据文件还有对应的_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
```

0 commit comments

Comments
 (0)