We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eff9335 commit 7b99cfbCopy full SHA for 7b99cfb
src/backend/utils/error/elog.c
@@ -1658,10 +1658,14 @@ write_console(const char *line, int len)
1658
/*
1659
* WriteConsoleW() will fail of stdout is redirected, so just fall through
1660
* to writing unconverted to the logfile in this case.
1661
+ *
1662
+ * Since we palloc the structure required for conversion, also fall through
1663
+ * to writing unconverted if we have not yet set up CurrentMemoryContext.
1664
*/
1665
if (GetDatabaseEncoding() != GetPlatformEncoding() &&
1666
!in_error_recursion_trouble() &&
- !redirection_done)
1667
+ !redirection_done &&
1668
+ CurrentMemoryContext != NULL)
1669
{
1670
WCHAR *utf16;
1671
int utf16len;
0 commit comments