将 table 保留在缓冲区中的 Postgres pg_prewarm 在删除 table 后给出 0

Postgres pg_prewarm to keep table in buffer gives 0 after dropping table

我按照本教程中概述的步骤使用 pg_prewarm 扩展在 PostgreSQL 中预热缓冲区缓存:

https://ismailyenigul.medium.com/pg-prewarm-extention-to-pre-warming-the-buffer-cache-in-postgresql-7e033b9a386d

我第一次 运行 结果是 1:

mydb=> SELECT pg_prewarm('useraccount');
 pg_prewarm 
------------
          1

之后我不得不删除 table 并重新创建它。从那以后,当我 运行 相同的命令时,我总是得到 0 作为结果。我不确定这是预期的还是我遗漏了什么?

mydb=> SELECT pg_prewarm('useraccount');
 pg_prewarm 
------------
          0

contrib/pg_prewarm/pg_prewarm.c中的函数注释说:

 * [...] The
 * return value is the number of blocks successfully prewarmed.

所以第一次,table中有1个区块。删除并重新创建 table 后,它是空的,因此缓存了 0 个块。