Skip to content

Commit 1da2f64

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 748da01 commit 1da2f64

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
@@ -15098,18 +15098,34 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
1509815098
</para>
1509915099

1510015100
<para>
15101-
<function>pg_relation_size</> accepts the OID or name of a table, index or
15102-
toast table, and returns the on-disk size in bytes. Specifying
15103-
<literal>'main'</literal> or leaving out the second argument returns the
15104-
size of the main data fork of the relation. Specifying
15105-
<literal>'fsm'</literal> returns the size of the
15106-
Free Space Map (see <xref linkend="storage-fsm">) associated with the
15107-
relation. Specifying <literal>'vm'</literal> returns the size of the
15108-
Visibility Map (see <xref linkend="storage-vm">) associated with the
15109-
relation. Note that this function shows the size of only one fork;
15110-
for most purposes it is more convenient to use the higher-level
15111-
functions <function>pg_total_relation_size</> or
15112-
<function>pg_table_size</>.
15101+
<function>pg_relation_size</> accepts the OID or name of a table, index
15102+
or toast table, and returns the on-disk size in bytes of one fork of
15103+
that relation. (Note that for most purposes it is more convenient to
15104+
use the higher-level functions <function>pg_total_relation_size</>
15105+
or <function>pg_table_size</>, which sum the sizes of all forks.)
15106+
With one argument, it returns the size of the main data fork of the
15107+
relation. The second argument can be provided to specify which fork
15108+
to examine:
15109+
<itemizedlist spacing="compact">
15110+
<listitem>
15111+
<para>
15112+
<literal>'main'</literal> returns the size of the main
15113+
data fork of the relation.
15114+
</para>
15115+
</listitem>
15116+
<listitem>
15117+
<para>
15118+
<literal>'fsm'</literal> returns the size of the Free Space Map
15119+
(see <xref linkend="storage-fsm">) associated with the relation.
15120+
</para>
15121+
</listitem>
15122+
<listitem>
15123+
<para>
15124+
<literal>'vm'</literal> returns the size of the Visibility Map
15125+
(see <xref linkend="storage-vm">) associated with the relation.
15126+
</para>
15127+
</listitem>
15128+
</itemizedlist>
1511315129
</para>
1511415130

1511515131
<para>

0 commit comments

Comments
 (0)