10000
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 e49ad77 commit 5735efeCopy full SHA for 5735efe
src/backend/utils/error/elog.c
@@ -1668,10 +1668,14 @@ write_console(const char *line, int len)
1668
/*
1669
* WriteConsoleW() will fail of stdout is redirected, so just fall through
1670
* to writing unconverted to the logfile in this case.
1671
+ *
1672
+ * Since we palloc the structure required for conversion, also fall through
1673
+ * to writing unconverted if we have not yet set up CurrentMemoryContext.
1674
*/
1675
if (GetDatabaseEncoding() != GetPlatformEncoding() &&
1676
!in_error_recursion_trouble() &&
- !redirection_done)
1677
+ !redirection_done &&
1678
+ CurrentMemoryContext != NULL)
1679
{
1680
WCHAR *utf16;
1681
int utf16len;
0 commit comments