我有这张桌子:
Table "public.region"
Column | Type | Collation | Nullable | Default
-------------+----------+-----------+----------+---------
r_regionkey | smallint | | not null |
r_name | text | | |
r_comment | text | | |
Indexes:
"region_pkey" PRIMARY KEY, btree (r_regionkey)
Referenced by:
TABLE "nation" CONSTRAINT "nation_n_regionkey_fkey" FOREIGN KEY (n_regionkey) REFERENCES region(r_regionkey)
奇怪的是这个查询:
select oid::regclass as tbl, relpages
from pg_class
where relname='region'
返回relpages = 0
。
- 为什么以及如何解决?如果我改变
smallint
它的int
工作原理(relpages = 1
)