This example involves a WAL record that only contains one block
reference, but many WAL records contain several block
references. Rows output by
<function>pg_get_wal_block_info</function> are guaranteed to
have a unique combination of
<replaceable>start_lsn</replaceable> and
<replaceable>block_id</replaceable> values.
</para>
<para>
Much of the information shown here matches the output that
<function>pg_get_wal_records_info</function> would show, given
the same arguments. However,
<function>pg_get_wal_block_info</function> unnests the
information from each WAL record into an expanded form by
outputting one row per block reference, so certain details are
tracked at the block reference level rather than at the
whole-record level. This structure is useful with queries that
track how individual blocks changed over time. Note that
records with no block references (e.g.,
<literal>COMMIT</literal> WAL records) will have no rows
returned, so <function>pg_get_wal_block_info</function> may
actually return <emphasis>fewer</emphasis> rows than
<function>pg_get_wal_records_info</function>.
</para>
<para>
The <structfield>reltablespace</structfield>,
<structfield>reldatabase</structfield>, and
<structfield>relfilenode</structfield> parameters reference
<link linkend="catalog-pg-tablespace"><structname>pg_tablespace</structname></link>.<structfield>oid</structfield>,
<link linkend="catalog-pg-database"><structname>pg_database</structname></link>.<structfield>oid</structfield>, and
<link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>relfilenode</structfield>
respectively. The <structfield>relforknumber</structfield>
field is the fork number within the relation for the block
reference; see <filename>common/relpath.h</filename> for
details.
</para>
<tip>
<para>
The <function>pg_filenode_relation</function> function (see
<xref linkend="functions-admin-dblocation"/>) can help you to
determine which relation was modified during original execution.
</para>
</tip>
<para>
It is possible for clients to avoid the overhead of
materializing block data. This may