postgres=# select * from pgfincore('testmem1', 'main', false);
-[ RECORD 1 ]-+-----------------
relpath | base/13003/16384
segment | 0
os_page_size | 4096
rel_os_pages | 42554
pages_mem | 2
group_mem | 1
os_pages_free | 325475
databit |
postgres=# select * from pgfincore('testmem1', false);
-[ RECORD 1 ]-+-----------------
relpath | base/13003/16384
segment | 0
os_page_size | 4096
rel_os_pages | 42554
pages_mem | 2
group_mem | 1
os_pages_free | 325475
databit |
postgres=# select * from pgfincore('testmem1');
-[ RECORD 1 ]-+-----------------
relpath | base/13003/16384
segment | 0
os_page_size | 4096
rel_os_pages | 42554
pages_mem | 2
group_mem | 1
os_pages_free | 325475
databit |
7、pgfadvise_loader:
这个函数可以对页面缓存直接进行两方面的作用。因此,它能通过页面的位图在缓存中来对页面进行加载或卸载。
它分为两个函数和上边的类似,就是设置缺省值,的输入参数是(relname, fork, segment, load, unload, databit)和(relname, segment, load, unload, databit),分别是对象名,进程名,文件序号,是否加载,是否卸载,位图信息。第二个函数默认fork为main。
它输出的是物理文件名及path(relpath),OS page或block大小(os_page_size), OS中剩余的page数(os_pages_free),加载的page数(pages_load),卸载的page数(pages_unload)。
postgres=# select * from pgfincore('testmem1');
-[ RECORD 1 ]-+-----------------
relpath | base/13003/16384
segment | 0
os_page_size | 4096
rel_os_pages | 42554
pages_mem | 0
group_mem | 0
os_pages_free | 331290
databit |
postgres=# select * from pgfadvise_loader('testmem1', 0, true, true, B'1100');
-[ RECORD 1 ]--+-----------------
relpath | base/13003/16384
os_page_size | 4096
os_pages_free | 331294
pages_loaded | 2
pages_unloaded | 2
postgres=# select * from pgfincore('testmem1');
-[ RECORD 1 ]-+-----------------
relpath | base/13003/16384
segment | 0
os_page_size | 4096
rel_os_pages | 42554
pages_mem | 2
group_mem | 1
os_pages_free | 331290
databit |
------------------------------------华丽丽的分割线------------------------------------
Ubuntu Server 14.04 下安装 PostgreSQL 9.3.5 数据库
CentOS 6.3环境下yum安装PostgreSQL 9.3
Ubuntu下LAPP(Linux+Apache+PostgreSQL+PHP)环境的配置与安装
PostgreSQL配置Streaming Replication集群
如何在CentOS 7/6.5/6.4 下安装PostgreSQL 9.3 与 phpPgAdmin
------------------------------------华丽丽的分割线------------------------------------