Home Explore Blog CI



postgresql

2nd chunk of `doc/src/sgml/pgvisibility.sgml`
9e88e44f1d7d5043eaac5e0784293a67fb229bb80a5b0d4400000001000007ef
 id="pgvisibility-funcs">
  <title>Functions</title>

  <variablelist>
   <varlistentry>
    <term><function>pg_visibility_map(relation regclass, blkno bigint, all_visible OUT boolean, all_frozen OUT boolean) returns record</function></term>
    <listitem>
     <para>
      Returns the all-visible and all-frozen bits in the visibility map for
      the given block of the given relation.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><function>pg_visibility(relation regclass, blkno bigint, all_visible OUT boolean, all_frozen OUT boolean, pd_all_visible OUT boolean) returns record</function></term>
    <listitem>
     <para>
      Returns the all-visible and all-frozen bits in the visibility map for
      the given block of the given relation, plus the
      <literal>PD_ALL_VISIBLE</literal> bit of that block.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><function>pg_visibility_map(relation regclass, blkno OUT bigint, all_visible OUT boolean, all_frozen OUT boolean) returns setof record</function></term>
    <listitem>
     <para>
      Returns the all-visible and all-frozen bits in the visibility map for
      each block of the given relation.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><function>pg_visibility(relation regclass, blkno OUT bigint, all_visible OUT boolean, all_frozen OUT boolean, pd_all_visible OUT boolean) returns setof record</function></term>

    <listitem>
     <para>
      Returns the all-visible and all-frozen bits in the visibility map for
      each block of the given relation, plus the <literal>PD_ALL_VISIBLE</literal>
      bit of each block.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><function>pg_visibility_map_summary(relation regclass, all_visible OUT bigint, all_frozen OUT bigint) returns record</function></term>

    <listitem>
     <para>
      Returns the number of all-visible pages and the number of all-frozen
      pages in the relation

Title: pg_visibility Module: Function Descriptions
Summary
This section details the functions provided by the pg_visibility module in PostgreSQL. It includes functions to retrieve visibility information for specific blocks or entire relations. The functions described are: pg_visibility_map, which returns all-visible and all-frozen bits for a given block or all blocks; pg_visibility, which additionally returns the PD_ALL_VISIBLE bit; and pg_visibility_map_summary, which provides a count of all-visible and all-frozen pages in a relation. These functions allow users to examine visibility map information at various levels of granularity, from individual blocks to entire relations.