branch: elpa/pg
commit 5545383173cf5db5276be07cf15801fd5a7b93a5
Author: Eric Marsden <[email protected]>
Commit: Eric Marsden <[email protected]>
Add additional sleep-for for Microsoft Windows platforms
Microsoft Windows: add additional sleep using `sleep-for` when waiting for
network data. The existing calls to `accept-process-output` with a timeout
are
insufficient on this platform when reading large resultsets. Further
testing is
needed to determine whether this is also necessary on other non-Linux
platforms
like MS-DOS and Darwin.
---
CHANGELOG.md | 4 ++++
pg.el | 2 ++
2 files changed, 6 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fcd07afd304..5a8755d7c87 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@
`pg-read-net-int`, `pg-read-int`, `pg-read-chars`, `pg-read-string` to use
the naming convention
for internal functions (`pg--` prefix).
+- Microsoft Windows: add additional sleep using `sleep-for` when waiting for
network data. The
+ existing calls to `accept-process-output` with a timeout are insufficient on
this platform when
+ reading large resultsets.
+
## [0.61] - 2025-11-22
diff --git a/pg.el b/pg.el
index 10ce79ffe66..48d7cc78d8e 100644
--- a/pg.el
+++ b/pg.el
@@ -4305,6 +4305,8 @@ The RowDescription data is provided in ATTRIBUTES."
(when (null (char-after pgcon--position))
(dotimes (_i (pgcon-timeout con))
(when (null (char-after pgcon--position))
+ (when (eq system-type 'windows-nt)
+ (sleep-for 0.1))
(accept-process-output process 1.0))))
(when (null (char-after pgcon--position))
(let ((msg (format "Timeout in pg--read-char reading from %s" con)))