Skip to content

Commit 561ac1b

Browse files
committed
Rearrange documentation paragraph describing pg_relation_size().
Break the list of available options into an <itemizedlist> instead of inline sentences. This is mostly motivated by wanting to ensure that the cross-references to the FSM and VM docs don't cross page boundaries in PDF format; but it seems to me to read more easily this way anyway. I took the liberty of editorializing a bit further while at it. Per complaint from Magnus about 9.0.18 docs not building in A4 format. Patch all active branches so we don't get blind-sided by this particular issue again in future.
1 parent f38ad11 commit 561ac1b

File tree

1 file changed

+28
-12
lines changed

1 file changed

+28
-12
lines changed

doc/src/sgml/func.sgml

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13527,18 +13527,34 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
1352713527
</para>
1352813528

1352913529
<para>
13530-
<function>pg_relation_size</> accepts the OID or name of a table, index or
13531-
toast table, and returns the on-disk size in bytes. Specifying
13532-
<literal>'main'</literal> or leaving out the second argument returns the
13533-
size of the main data fork of the relation. Specifying
13534-
<literal>'fsm'</literal> returns the size of the
13535-
Free Space Map (see <xref linkend="storage-fsm">) associated with the
13536-
relation. Specifying <literal>'vm'</literal> returns the size of the
13537-
Visibility Map (see <xref linkend="storage-vm">) associated with the
13538-
relation. Note that this function shows the size of only one fork;
13539-
for most purposes it is more convenient to use the higher-level
13540-
functions <function>pg_total_relation_size</> or
13541-
<function>pg_table_size</>.
13530+
<function>pg_relation_size</> accepts the OID or name of a table, index
13531+
or toast table, and returns the on-disk size in bytes of one fork of
13532+
that relation. (Note that for most purposes it is more convenient to
13533+
use the higher-level functions <function>pg_total_relation_size</>
13534+
or <function>pg_table_size</>, which sum the sizes of all forks.)
13535+
With one argument, it returns the size of the main data fork of the
13536+
relation. The second argument can be provided to specify which fork
13537+
to examine:
13538+
<itemizedlist spacing="compact">
13539+
<listitem>
13540+
<para>
13541+
<literal>'main'</literal> returns the size of the main
13542+
data fork of the relation.
13543+
</para>
13544+
</listitem>
13545+
<listitem>
13546+
<para>
13547+
<literal>'fsm'</literal> returns the size of the Free Space Map
13548+
(see <xref linkend="storage-fsm">) associated with the relation.
13549+
</para>
13550+
</listitem>
13551+
<listitem>
13552+
<para>
13553+
<literal>'vm'</literal> returns the size of the Visibility Map
13554+
(see <xref linkend="storage-vm">) associated with the relation.
13555+
</para>
13556+
</listitem>
13557+
</itemizedlist>
1354213558
</para>
1354313559

1354413560
<para>

0 commit comments

Comments
 (0)