Skip to content

Commit 054fc30

Browse files
committed
Fix failure to follow the directions when "init" fork was added.
Specifically this commit updates forkname_to_number() so that the HINT message includes "init" fork, and also adds the description of "init" fork into pg_relation_size() document. This is a part of the commit 2d00190 which has fixed the same oversight in master and 9.4. Back-patch to 9.1 where "init" fork was added.
1 parent 84317b0 commit 054fc30

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

doc/src/sgml/func.sgml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14991,7 +14991,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
1499114991
<entry><type>bigint</type></entry>
1499214992
<entry>
1499314993
Disk space used by the specified fork (<literal>'main'</literal>,
14994-
<literal>'fsm'</literal> or <literal>'vm'</>)
14994+
<literal>'fsm'</literal>, <literal>'vm'</>, or <literal>'init'</>)
1499514995
of the specified table or index
1499614996
</entry>
1499714997
</row>
@@ -15125,6 +15125,12 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
1512515125
(see <xref linkend="storage-vm">) associated with the relation.
1512615126
</para>
1512715127
</listitem>
15128+
<listitem>
15129+
<para>
15130+
<literal>'init'</literal> returns the size of the initialization fork,
15131+
if any, (see <xref linkend="storage-init">) associated with the relation.
15132+
</para>
15133+
</listitem>
1512815134
</itemizedlist>
1512915135
</para>
1513015136

src/backend/catalog/catalog.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ forkname_to_number(char *forkName)
7575
ereport(ERROR,
7676
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
7777
errmsg("invalid fork name"),
78-
errhint("Valid fork names are \"main\", \"fsm\", and \"vm\".")));
78+
errhint("Valid fork names are \"main\", \"fsm\", "
79+
"\"vm\", and \"init\".")));
7980
return InvalidForkNumber; /* keep compiler quiet */
8081
}
8182

0 commit comments

Comments
 (0)