From 27990ea9081e8819689b0428325d03b3d2fd6928 Mon Sep 17 00:00:00 2001 From: I Luk Kim Date: Thu, 23 Apr 2026 22:26:52 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20=5FCHUNK=201500=E2=86=921200=20=E2=80=94?= =?UTF-8?q?=20asyncpg=2032767=20param=20limit=20=EB=B0=A9=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 26 cols × 1500 = 39000 > 32767로 MSTR/COIN/META/GOOGL 등 대형 filer에서 batch insert 실패. 26 cols × 1200 = 31200으로 안전하게 유지. Co-Authored-By: Claude Sonnet 4.6 --- app/services/insider_transaction_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/insider_transaction_service.py b/app/services/insider_transaction_service.py index 812d0c5..6084ecb 100644 --- a/app/services/insider_transaction_service.py +++ b/app/services/insider_transaction_service.py @@ -22,7 +22,7 @@ from app.services.sec_full_index_service import IndexEntry logger = logging.getLogger(__name__) # Chunk size for batch insert (asyncpg 32767-param limit) -_CHUNK = 1500 # ~22 cols × 1500 = 33000 → stay under 32767 with ~20 populated +_CHUNK = 1200 # 26 cols × 1200 = 31200 → safely under asyncpg 32767-param limit # C-suite title regex patterns (case-insensitive) _RE_CEO = re.compile(r"\b(CEO|Chief\s+Executive\s+Officer)\b", re.IGNORECASE)