sql - Mapped relation in postgresql -
i have been playing postgresql while , 1 caught eye. "mapped relation" in postgresql. according documentation,
when name of on-disk file zero, called "mapped" relation disk file name determined low - level state.
is simple relation doesnt have fixed oid reference with. why created? significance?or similar temp table? can 1 thow light on this?
https://www.postgresql.org/docs/current/static/storage-file-layout.html
also, system catalogs including pg_class itself, pg_class.relfilenode contains zero. actual filenode number of these catalogs stored in lower-level data structure, , can obtained using pg_relation_filenode() function.
t=# select relfilenode pg_class relname = 'pg_class'; relfilenode ------------- 0 (1 row) t=# select pg_relation_filenode('pg_class'); pg_relation_filenode ---------------------- 12712 (1 row) now little barbarian (yet user friendly) way make sure file:
t=# create table very_special_name(i int); create table t=# checkpoint; --to write disk checkpoint t=# select oid pg_database datname='t'; oid ---------- 13805223 (1 row) so check readable strings:
-bash-4.2$ strings /pg/data/base/13805223/12712 | grep very_special very_special_name new table name in...
Comments
Post a Comment