bench: SQL синтетики через stdin psql (лимит командной строки Windows)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alexey Bodanyuk
2026-10-25 15:12:05 +03:00
co-authored by Claude Opus 5.5
parent 046e257f90
commit fc50362470
+2 -1
View File
@@ -59,8 +59,9 @@ def compose(*args: str, stdin: str | None = None, timeout: float = 1800, check:
def psql(sql: str) -> str:
"""SQL through stdin: a 5000-row INSERT does not fit into a Windows command line (32 KiB)."""
return compose("exec", "-T", "postgres", "psql", "-U", "messenger", "-d", "messenger", "-At", "-v",
"ON_ERROR_STOP=1", "-c", sql).stdout.strip()
"ON_ERROR_STOP=1", "-f", "-", stdin=sql).stdout.strip()
def s3_bulk(op: str, keys: list[str]) -> None: