重庆思庄Oracle、Redhat认证学习论坛

标题: 可见性映射VM的查看 [打印本页]

作者: 郑全    时间: 2024-1-1 18:00
标题: 可见性映射VM的查看

默认是没有安装:
postgres@:5432/postgres-96307#=select pg_visibility_map('student');
ERROR:  function pg_visibility_map(unknown) does not exist
LINE 1: select pg_visibility_map('student');
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
postgres@:5432/postgres-96307#=\dx
                                            List of installed extensions
        Name        | Version |   Schema   |                              Description                              
--------------------+---------+------------+------------------------------------------------------------------------
pg_buffercache     | 1.4     | public     | examine the shared buffer cache
pg_stat_statements | 1.10    | public     | track planning and execution statistics of all SQL statements executed
plpgsql            | 1.0     | pg_catalog | PL/pgSQL procedural language
(3 rows)


--创建pg_visibility
postgres@:5432/postgres-96307#=create extension pg_visibility;
CREATE EXTENSION

postgres@:5432/postgres-96307#=\dx
                                            List of installed extensions
        Name        | Version |   Schema   |                              Description                              
--------------------+---------+------------+------------------------------------------------------------------------
pg_buffercache     | 1.4     | public     | examine the shared buffer cache
pg_stat_statements | 1.10    | public     | track planning and execution statistics of all SQL statements executed
pg_visibility      | 1.2     | public     | examine the visibility map (VM) and page-level visibility info
plpgsql            | 1.0     | pg_catalog | PL/pgSQL procedural language
(4 rows)

为给定关系的给定块返回其在可见性映射中的“全部可见”和“全部冻结”位。


postgres@:5432/postgres-96307#=select pg_visibility_map('student');
pg_visibility_map
-------------------
(0,t,t)
(1 row)







欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2