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
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