diff --git a/src/common/psprintf.c b/src/common/psprintf.c index b974a99be12..1254a9ed4dd 100644 --- a/src/common/psprintf.c +++ b/src/common/psprintf.c @@ -129,9 +129,9 @@ pvsnprintf(char *buf, size_t len, const char *fmt, va_list args) if (nprinted < 0 && errno != 0 && errno != ENOMEM) { #ifndef FRONTEND - elog(ERROR, "vsnprintf failed: %m"); + elog(ERROR, "vsnprintf failed: %m with format string \"%s\"", fmt); #else - fprintf(stderr, "vsnprintf failed: %s\n", strerror(errno)); + fprintf(stderr, "vsnprintf failed: %m with format string \"%s\"\n", fmt); exit(EXIT_FAILURE); #endif }