stdout.patch
text/plain
Filename: stdout.patch
Type: text/plain
Part: 0
Patch
Format: unified
| File | + | − |
|---|---|---|
| src/port/snprintf.c | 8 | 0 |
diff --git a/src/port/snprintf.c b/src/port/snprintf.c index 83a8103..17dc505 100644 --- a/src/port/snprintf.c +++ b/src/port/snprintf.c @@ -313,6 +313,14 @@ flushbuffer(PrintfTarget *target) target->failed = true; } target->bufptr = target->bufstart; + /* + * Sometimes the output to stdout on Windows on multicore machines + * does not go through after connecting and disconnecting to the server + * using the PQconnectdbParams and PQfinish functions. + */ +#ifdef WIN32 + fflush(target->stream); +#endif }