postgres drop table后会删除物理文件

来源:互联网 发布:matlab 无标度网络 编辑:程序博客网 时间:2024/05/23 18:33
test=> select pg_relation_filepath('test');
 pg_relation_filepath 
----------------------
 base/16384/16394
(1 row)

[postgres9.6@db 16384]$ pwd
/home/postgres9.6/data/base/16384
[postgres9.6@db 16384]$ ll 16394
-rw------- 1 postgres9.6 postgres 8192 Feb  6 11:46 16394

test=> drop table test;
DROP TABLE

[postgres9.6@db 16384]$ pwd
/home/postgres9.6/data/base/16384
[postgres9.6@db 16384]$ ll 16394
-rw------- 1 postgres9.6 postgres 0 Feb  6 11:48 16394

过一会再查询:
[postgres9.6@db 16384]$ ll 16394
ls: cannot access 16394: No such file or directory
原创粉丝点击