aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorNathan Bossart <nathan@postgresql.org>2024-03-04 15:41:42 -0600
committerNathan Bossart <nathan@postgresql.org>2024-03-04 15:41:42 -0600
commit2c29e7fc95b24f5ccfec0d2db458d2130606f446 (patch)
tree1d05b2693f525b2203bf6001163f47266b900a27 /doc/src
parente5bc9454e527b1cba97553531d8d4992892fdeef (diff)
downloadpostgresql-2c29e7fc95b24f5ccfec0d2db458d2130606f446.tar.gz
postgresql-2c29e7fc95b24f5ccfec0d2db458d2130606f446.zip
Add macro for customizing an archiving WARNING message.
Presently, if an archive module's check_configured_cb callback returns false, a generic WARNING message is emitted, which unfortunately provides no actionable details about the reason why the module is not configured. This commit introduces a macro that archive module authors can use to add a DETAIL line to this WARNING message. Co-authored-by: Tung Nguyen Reviewed-by: Daniel Gustafsson, Álvaro Herrera Discussion: https://postgr.es/m/4109578306242a7cd5661171647e11b2%40oss.nttdata.com
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/archive-modules.sgml12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/src/sgml/archive-modules.sgml b/doc/src/sgml/archive-modules.sgml
index 7064307d9e6..cf7438a7593 100644
--- a/doc/src/sgml/archive-modules.sgml
+++ b/doc/src/sgml/archive-modules.sgml
@@ -114,6 +114,18 @@ WARNING: archive_mode enabled, yet archiving is not configured
In the latter case, the server will periodically call this function, and
archiving will proceed only when it returns <literal>true</literal>.
</para>
+
+ <note>
+ <para>
+ When returning <literal>false</literal>, it may be useful to append some
+ additional information to the generic warning message. To do that, provide
+ a message to the <function>arch_module_check_errdetail</function> macro
+ before returning <literal>false</literal>. Like
+ <function>errdetail()</function>, this macro accepts a format string
+ followed by an optional list of arguments. The resulting string will be
+ emitted as the <literal>DETAIL</literal> line of the warning message.
+ </para>
+ </note>
</sect2>
<sect2 id="archive-module-archive">