mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
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
This commit is contained in:
@ -161,7 +161,12 @@ check_archive_directory(char **newval, void **extra, GucSource source)
|
||||
static bool
|
||||
basic_archive_configured(ArchiveModuleState *state)
|
||||
{
|
||||
return archive_directory != NULL && archive_directory[0] != '\0';
|
||||
if (archive_directory != NULL && archive_directory[0] != '\0')
|
||||
return true;
|
||||
|
||||
arch_module_check_errdetail("%s is not set.",
|
||||
"basic_archive.archive_directory");
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user